From 7e9864e02175dc4c34409959d5799236b07fdc5c Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sat, 1 Dec 2018 04:10:31 +0500 Subject: [PATCH] Improve specs --- spec/requests/membership_applications/create_spec.rb | 4 ++++ spec/requests/passports/create_spec.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/requests/membership_applications/create_spec.rb b/spec/requests/membership_applications/create_spec.rb index 36ff520..d4cc0f3 100644 --- a/spec/requests/membership_applications/create_spec.rb +++ b/spec/requests/membership_applications/create_spec.rb @@ -20,6 +20,10 @@ RSpec.describe 'POST /membership_applications' do context 'after request' do before { make_request } + specify do + expect(response).to redirect_to root_url + end + specify do expect(MembershipApplication.last).to \ have_attributes membership_application_attributes diff --git a/spec/requests/passports/create_spec.rb b/spec/requests/passports/create_spec.rb index 1d3ace2..4b3bbde 100644 --- a/spec/requests/passports/create_spec.rb +++ b/spec/requests/passports/create_spec.rb @@ -27,7 +27,7 @@ RSpec.describe 'POST /passports' do before { make_request } specify do - expect(response).to redirect_to passport_url Passport.last + expect(response).to redirect_to Passport.last end specify do