2013-05-06 08:09:26 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-12-09 04:50:51 -05:00
|
|
|
describe DeployKey, models: true do
|
2016-12-06 08:33:55 -05:00
|
|
|
include EmailHelpers
|
|
|
|
|
2013-05-06 08:09:26 -04:00
|
|
|
describe "Associations" do
|
2015-02-12 13:17:35 -05:00
|
|
|
it { is_expected.to have_many(:deploy_keys_projects) }
|
|
|
|
it { is_expected.to have_many(:projects) }
|
2013-05-06 08:09:26 -04:00
|
|
|
end
|
2016-11-18 06:09:03 -05:00
|
|
|
|
|
|
|
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
|
2013-05-06 08:09:26 -04:00
|
|
|
end
|