#349: updated specs according to comments
This commit is contained in:
parent
ecae06db81
commit
9fd8a5a8d1
|
@ -15,17 +15,13 @@ describe Users::ProfileController do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'for guest' do
|
context 'for guest' do
|
||||||
|
it 'should be able to view profile', :anonymous_access => true do
|
||||||
if APP_CONFIG['anonymous_access']
|
get :show, :uname => @simple_user.uname
|
||||||
it 'should be able to view profile' do
|
response.code.should eq('200')
|
||||||
get :show, :uname => @simple_user.uname
|
end
|
||||||
response.code.should eq('200')
|
it 'should not be able to perform show action', :anonymous_access => false do
|
||||||
end
|
get :show, :uname => @simple_user.uname
|
||||||
else
|
response.should redirect_to(new_user_session_path)
|
||||||
it 'should not be able to perform show action' do
|
|
||||||
get :show, :uname => @simple_user.uname
|
|
||||||
response.should redirect_to(new_user_session_path)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue