|
|
|
@ -391,14 +391,14 @@ RSpec.describe "User Features" do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "allows to cancel user deactivation" do |
|
|
|
|
click_link("No - I’ve changed my mind") |
|
|
|
|
click_link("No – I’ve changed my mind") |
|
|
|
|
expect(page).to have_current_path("/users/#{other_user.id}") |
|
|
|
|
expect(page).to have_no_content("This user has been deactivated.") |
|
|
|
|
expect(page).to have_no_css(".govuk-notification-banner.govuk-notification-banner--success") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "allows to deactivate the user" do |
|
|
|
|
click_button("I’m sure - deactivate this user") |
|
|
|
|
click_button("I’m sure – deactivate this user") |
|
|
|
|
expect(page).to have_current_path("/users/#{other_user.id}") |
|
|
|
|
expect(page).to have_content("This user has been deactivated.") |
|
|
|
|
expect(page).to have_css(".govuk-notification-banner.govuk-notification-banner--success") |
|
|
|
@ -428,7 +428,7 @@ RSpec.describe "User Features" do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "allows to cancel user reactivation" do |
|
|
|
|
click_link("No - I’ve changed my mind") |
|
|
|
|
click_link("No – I’ve changed my mind") |
|
|
|
|
expect(page).to have_current_path("/users/#{other_user.id}") |
|
|
|
|
expect(page).to have_content("This user has been deactivated.") |
|
|
|
|
expect(page).to have_no_css(".govuk-notification-banner.govuk-notification-banner--success") |
|
|
|
@ -436,7 +436,7 @@ RSpec.describe "User Features" do
|
|
|
|
|
|
|
|
|
|
it "allows to reactivate the user" do |
|
|
|
|
expect(notify_client).to receive(:send_email).with(email_address: other_user.email, template_id: User::USER_REACTIVATED_TEMPLATE_ID, personalisation:).once |
|
|
|
|
click_button("I’m sure - reactivate this user") |
|
|
|
|
click_button("I’m sure – reactivate this user") |
|
|
|
|
expect(page).to have_current_path("/users/#{other_user.id}") |
|
|
|
|
expect(page).to have_no_content("This user has been deactivated.") |
|
|
|
|
expect(page).to have_css(".govuk-notification-banner.govuk-notification-banner--success") |
|
|
|
|