-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submit specs for Token Rebuild and Release policies
Delete the unecessary VCR files (to test the policy we don't need the backend)
- Loading branch information
Showing
5 changed files
with
68 additions
and
117 deletions.
There are no files selected for viewing
50 changes: 25 additions & 25 deletions
50
src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_1.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
106 changes: 15 additions & 91 deletions
106
src/api/spec/cassettes/Token_RebuildPolicy/_create/create_/1_1_1_2.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe Token::ReleasePolicy do | ||
let!(:user) { create(:confirmed_user, login: 'foo') } | ||
let!(:project) { create(:project, maintainer: user) } | ||
let!(:package) { create(:package, project: project) } | ||
let!(:other_user) { build(:confirmed_user, login: 'bar') } | ||
let!(:release_token) { create(:release_token, :with_package_from_association_or_param, user: user, package: package) } | ||
let!(:other_user_release_token) { create(:release_token, :with_package_from_association_or_param, user: other_user) } | ||
|
||
subject { described_class } | ||
|
||
describe '#create' do | ||
permissions :create? do | ||
it { expect(subject).to permit(user, release_token) } | ||
it { expect(subject).not_to permit(other_user, other_user_release_token) } | ||
end | ||
end | ||
end |