mending failing tests

This commit is contained in:
shlok007 2017-06-14 21:59:58 +05:30
parent ad3d6f2f95
commit 8839a928ed
5 changed files with 16 additions and 20 deletions

View file

@ -16,7 +16,7 @@ describe Admin::OrganizationsController do
end
it 'redirects to root' do
expect(flash[:alert]).to eq('You are not authorized to access this area!')
expect(flash[:alert]).to eq('You are not authorized to access this page.')
expect(response).to redirect_to(root_path)
end
end
@ -27,7 +27,7 @@ describe Admin::OrganizationsController do
end
it 'redirects to root' do
expect(flash[:alert]).to eq('You are not authorized to access this area!')
expect(flash[:alert]).to eq('You are not authorized to access this page.')
expect(response).to redirect_to(root_path)
end
end
@ -43,7 +43,7 @@ describe Admin::OrganizationsController do
it 'redirects to root' do
post :create, organization: attributes_for(:organization)
expect(flash[:alert]).to eq('You are not authorized to access this area!')
expect(flash[:alert]).to eq('You are not authorized to access this page.')
expect(response).to redirect_to(root_path)
end
end
@ -55,7 +55,7 @@ describe Admin::OrganizationsController do
organization.reload
expect(organization.name).to eq(old_name)
expect(flash[:alert]).to eq('You are not authorized to access this area!')
expect(flash[:alert]).to eq('You are not authorized to access this page.')
expect(response).to redirect_to(root_path)
end
end
@ -72,7 +72,7 @@ describe Admin::OrganizationsController do
it 'redirects to root' do
delete :destroy, id: organization.id
expect(flash[:alert]).to eq('You are not authorized to access this area!')
expect(flash[:alert]).to eq('You are not authorized to access this page.')
expect(response).to redirect_to(root_path)
end
end