|
|
@ -37,6 +37,14 @@ RSpec.describe SchemesController, type: :request do |
|
|
|
get "/schemes" |
|
|
|
get "/schemes" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "params scheme_id is present" do |
|
|
|
|
|
|
|
it "shows a success banner" do |
|
|
|
|
|
|
|
get "/schemes", params: { scheme_id: schemes.first.id } |
|
|
|
|
|
|
|
follow_redirect! |
|
|
|
|
|
|
|
expect(page).to have_css(".govuk-notification-banner.govuk-notification-banner--success") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "redirects to the organisation schemes path" do |
|
|
|
it "redirects to the organisation schemes path" do |
|
|
|
follow_redirect! |
|
|
|
follow_redirect! |
|
|
|
expect(path).to match("/organisations/#{user.organisation.id}/schemes") |
|
|
|
expect(path).to match("/organisations/#{user.organisation.id}/schemes") |
|
|
|