From f8cd616b1e7a4565c31579ab17951901902b4453 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 10 Oct 2015 14:24:06 +0200 Subject: Rerender form instead of redirecting on error. --- spec/registration_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb index 6532f3e..33df205 100644 --- a/spec/registration_spec.rb +++ b/spec/registration_spec.rb @@ -88,11 +88,10 @@ describe RegistrationApp do end it 'should reject request and go back to the registration form' do - expect(last_response.status).to eq(302) + expect(last_response.body).to match /form id="registration-form"/ end it 'should display an error message' do - follow_redirect! expect(last_response.body).to include "Du må ha med minst én låt" end end -- cgit v1.2.3