#82: fixed API specs

This commit is contained in:
Vokhmin Alexey V 2013-04-09 01:54:34 +04:00
parent 07c86f7fd1
commit b70f596f77
1 changed files with 5 additions and 3 deletions

View File

@ -308,9 +308,11 @@ describe Api::V1::RepositoriesController do
before(:each) do
@user = FactoryGirl.create(:user)
http_login(@user)
platform = @repository.platform
platform.owner = @user; platform.save
@repository.platform.relations.create!(:actor_type => 'User', :actor_id => @user.id, :role => 'admin')
[@repository, @personal_repository].each do |repository|
platform = repository.platform
platform.owner = @user; platform.save
repository.platform.relations.create!(:actor_type => 'User', :actor_id => @user.id, :role => 'admin')
end
end
it_should_behave_like 'api repository user with reader rights'