BigW Consortium Gitlab

deploy_key_spec.rb 458 Bytes
Newer Older
1 2
require 'spec_helper'

Douwe Maan committed
3
describe DeployKey, models: true do
4 5
  include EmailHelpers

6
  describe "Associations" do
7 8
    it { is_expected.to have_many(:deploy_keys_projects) }
    it { is_expected.to have_many(:projects) }
9
  end
10 11 12 13 14 15 16 17 18 19 20 21

  describe 'notification' do
    let(:user) { create(:user) }

    it 'does not send a notification' do
      perform_enqueued_jobs do
        create(:deploy_key, user: user)
      end

      should_not_email(user)
    end
  end
22
end