#349: updated specs according to comments

This commit is contained in:
Vokhmin Alexey V 2012-10-02 21:22:24 +04:00
parent ecae06db81
commit 9fd8a5a8d1
1 changed files with 7 additions and 11 deletions

View File

@ -15,19 +15,15 @@ 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']
it 'should be able to view profile' do
get :show, :uname => @simple_user.uname get :show, :uname => @simple_user.uname
response.code.should eq('200') response.code.should eq('200')
end end
else it 'should not be able to perform show action', :anonymous_access => false do
it 'should not be able to perform show action' do
get :show, :uname => @simple_user.uname get :show, :uname => @simple_user.uname
response.should redirect_to(new_user_session_path) response.should redirect_to(new_user_session_path)
end end
end end
end
context 'for simple user' do context 'for simple user' do
before(:each) do before(:each) do