Skip to content

Commit

Permalink
More specific test case pro changeset permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
iNecas committed Aug 31, 2011
1 parent f0fd17d commit 2e63af1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spec/controllers/api/changesets_controller_spec.rb
Expand Up @@ -27,6 +27,7 @@

@organization = Organization.create!(:name => 'test_org', :cp_key => 'test_org')
@environment = KTEnvironment.create!(:name => 'test_1', :prior => @organization.locker.id, :organization => @organization)
@environment_2 = KTEnvironment.create!(:name => 'test_2', :prior => @environment, :organization => @organization)
KTEnvironment.stub(:find).and_return(@environment)

@changeset = mock(Changeset)
Expand All @@ -52,7 +53,7 @@
user_with_permissions { |u| u.can(:read_changesets,:environments, @environment.id, @organization) }
end
let(:user_without_read_permissions) do
user_without_permissions
user_with_permissions { |u| u.can(:read_changesets,:environments, @environment_2.id, @organization) }
end
let(:user_with_manage_permissions) do
user_with_permissions { |u| u.can([:manage_changesets],:environments, @environment.id, @organization) }
Expand Down

0 comments on commit 2e63af1

Please sign in to comment.