-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2401: Use different syntax #437
Conversation
app/spec/lib/users_rake_spec.rb
Outdated
user.reload | ||
expect(user.is_service_account).to eq(true) | ||
expect(user.api_access_tokens.count).to eq(1) | ||
end | ||
|
||
it "demotes a service account user and removes all access tokens" do | ||
user = create(:user, :with_access_token, is_service_account: true) | ||
ENV["id"] = user.id.to_s | ||
Rake::Task['users:demote_service_account'].execute | ||
Rake::Task['users:demote_service_account'].invoke(user.id.to_s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to pass in the arguments as keywords (like .invoke(user_id: user.id.to_s)
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope they're positional when i tested it...
Huh, these tests are failing again. flaky. |
# Conflicts: # app/lib/tasks/users.rake # app/spec/lib/users_rake_spec.rb
…ow-use-new-database * origin/main: FFS-2408: Rename site_id to client_agency_id (#446) FFS-2351: Change calculation of account_count to be correct in filed events (#445) Patching vulnerabilities | esbuild, net-imap (#450) Address vulnerability (#443) fix: upgrade postcss from 8.5.0 to 8.5.1 (#441) fix: upgrade sass from 1.83.2 to 1.83.4 (#440) 2401: Use different syntax (#437) updated tests for clarity fixed typo cleaned up based on PR comments removed trailing whitespace/rubocop fixes wrapped token creation for users.rake in a transaction, added test assertion to assure that the user api_access_tokens.count only changes by a factor of 1 updated vitest to v 3.0.5 address failed security scan rename vitest add github action fixed postcss build error added .vitest to git ignore updated package.json to use module setup project to work with vitest and debugging remove employer_search.spec comment out test write test scripts for pinwheel.js update apiservice to fetchInternalApiService for clarity refactored fetch into its own file refactored code to be a little more self evident remove outdated snapshots comment refactored api calls with tests added tests for trackUserAction api call move trackUserAction out of pinwheel into analytics file minor changes stub for employersearch test installed vitest
Ticket
N/A
Changes
Simplifies the syntax (sort of) so that it's easier to run these rake commands against a deployed environment through our infra platform tooling
Context for reviewers
Instead of
It's
Acceptance testing
:alert: Deploy block! @ffs-eng I just merged PR [#123] and will be doing acceptance testing in demo - please don't deploy until I'm finished!
)