fix platform specs

This commit is contained in:
Alexander Machehin 2013-06-10 17:26:36 +06:00
parent 28b12b8c96
commit dc3f0ab50b
1 changed files with 9 additions and 5 deletions

View File

@ -225,13 +225,17 @@ describe Api::V1::PlatformsController do
response.status.should == 401
end
[:show, :platforms_for_build].each do |action|
it "should not be able to perform #{ action } action", :anonymous_access => false do
get action, :format => :json
response.status.should == 401
end
it "should not be able to perform platforms_for_build action", :anonymous_access => false do
get :platforms_for_build, :format => :json
response.status.should == 401
end
it "should not be able to perform show action", :anonymous_access => false do
get :show, :id => @platform, :format => :json
response.status.should == 401
end
it 'should be able to perform members action', :anonymous_access => true do
get :members, :id => @platform.id, :format => :json
response.should render_template(:members)