diff options
Diffstat (limited to 'spec/models/deploy_key_spec.rb')
-rw-r--r-- | spec/models/deploy_key_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/deploy_key_spec.rb b/spec/models/deploy_key_spec.rb index 3272d5236d3..337fa40b4ba 100644 --- a/spec/models/deploy_key_spec.rb +++ b/spec/models/deploy_key_spec.rb @@ -10,6 +10,7 @@ RSpec.describe DeployKey, :mailer do is_expected.to have_many(:deploy_keys_projects_with_write_access) .conditions(can_push: true) .class_name('DeployKeysProject') + .inverse_of(:deploy_key) end it do @@ -20,7 +21,8 @@ RSpec.describe DeployKey, :mailer do end it { is_expected.to have_many(:projects) } - it { is_expected.to have_many(:protected_branch_push_access_levels) } + it { is_expected.to have_many(:protected_branch_push_access_levels).inverse_of(:deploy_key) } + it { is_expected.to have_many(:protected_tag_create_access_levels).inverse_of(:deploy_key) } end describe 'notification' do |