Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

[1594] Refactor Requirements Controller Spec #1619

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

esoterik
Copy link
Collaborator

@esoterik esoterik commented Aug 4, 2016

Resolves #1594

@esoterik esoterik force-pushed the 1594_refactor_req_controller_spec branch from b9ce89b to e23bf23 Compare August 9, 2016 14:16
it 'should redirect to root url if not an admin' do
sign_in FactoryGirl.create(:user)
get :show, id: @requirement
expect(response).to redirect_to(root_url)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is testing for show removed?

sign_in FactoryGirl.create(:admin)
get :edit, id: @requirement
end
it 'should set @requirement to the selected requirement' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume removed because the route doesn't get used?

end
it_behaves_like 'redirected request'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't check permissions, since a successful request will also redirect

end
it_behaves_like 'redirected request'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also doesn't check permissions, for same reason

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants