Browse Source

feat: update tests

pull/2307/head
natdeanlewissoftwire 2 years ago
parent
commit
502f02b026
  1. 4
      spec/features/user_spec.rb
  2. 4
      spec/requests/users_controller_spec.rb

4
spec/features/user_spec.rb

@ -487,7 +487,7 @@ RSpec.describe "User Features" do
it "allows to deactivate the user" do
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_content("Deactivated")
expect(page).to have_css(".govuk-notification-banner.govuk-notification-banner--success")
end
end
@ -517,7 +517,7 @@ RSpec.describe "User Features" do
it "allows to cancel user reactivation" do
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_content("Deactivated")
expect(page).to have_no_css(".govuk-notification-banner.govuk-notification-banner--success")
end

4
spec/requests/users_controller_spec.rb

@ -622,7 +622,7 @@ RSpec.describe UsersController, type: :request do
end
it "shows if user is not active" do
expect(page).to have_content("This user has been deactivated.")
expect(page).to have_content("Deactivated")
end
it "allows reactivating the user" do
@ -1467,7 +1467,7 @@ RSpec.describe UsersController, type: :request do
end
it "shows if user is not active" do
expect(page).to have_content("This user has been deactivated.")
expect(page).to have_content("Deactivated")
end
it "allows reactivating the user" do

Loading…
Cancel
Save