summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/registration_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb
index 4dd57d5..95ed6a0 100644
--- a/spec/registration_spec.rb
+++ b/spec/registration_spec.rb
@@ -42,12 +42,10 @@ describe RegistrationApp do
get '/'
end
- it 'should succeed' do
- expect(last_response).to be_ok
- end
-
- it 'displays message that registration is closed' do
- expect(last_response.body).to match(/Registreringen er stengt/)
+ it 'should redirect to registrations closed page' do
+ expect(last_response).to be_redirect
+ follow_redirect!
+ expect(last_response.location).to match '/registrations_closed'
end
end
end
@@ -183,7 +181,9 @@ describe RegistrationApp do
end
it 'redirects to registration closed message' do
- expect(last_response.body).to match('Registreringen er stengt')
+ expect(last_response).to be_redirect
+ follow_redirect!
+ expect(last_response.location).to match '/registrations_closed'
end
end
end