-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
19 additions
and
244 deletions.
There are no files selected for viewing
30 changes: 1 addition & 29 deletions
30
app/controllers/admin/manage_users/active_users_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
RSpec.shared_context 'when logged in user is admin', shared_context: :metadata do | ||
before do | ||
current_user.update(can_manage_others: true) | ||
end | ||
let(:current_user_can_manage_others) { true } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,13 @@ | |
first_name: 'Zoe', | ||
last_name: 'Blogs', | ||
email: '[email protected]', | ||
auth_subject_id: SecureRandom.uuid | ||
auth_subject_id: SecureRandom.uuid, | ||
can_manage_others: user_can_manage_others | ||
) | ||
end | ||
|
||
let(:user_can_manage_others) { false } | ||
|
||
let(:user_row) do | ||
find( | ||
:xpath, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,14 @@ | |
end | ||
|
||
describe 'viewing the activation in the user\'s account history' do | ||
let(:invited_user) { User.create(email: '[email protected]', can_manage_others: true) } | ||
let(:cells) { page.first('table tbody tr').all('td') } | ||
|
||
before do | ||
invited_user.update(can_manage_others: true) | ||
click_on 'Sign in' | ||
click_on 'Invited Test' | ||
end | ||
|
||
let(:cells) { page.first('table tbody tr').all('td') } | ||
|
||
it 'describes the event' do | ||
expect(cells[1]).to have_content 'Account activated' | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,9 +98,10 @@ def do_deactivate_journey | |
end | ||
|
||
describe 'with only 2 active admins' do | ||
let(:user_can_manage_others) { true } | ||
|
||
before do | ||
User.create!(can_manage_others: true, deactivated_at: Time.zone.now, email: '[email protected]') # Inactive | ||
active_user.update(can_manage_others: true) | ||
|
||
do_deactivate_journey | ||
click_on('Yes, deactivate') | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters