2016-06-02 11:05:42 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe EmailsOnPushService do
|
|
|
|
describe 'Validations' do
|
|
|
|
context 'when service is active' do
|
2017-09-10 17:25:29 +05:30
|
|
|
before do
|
|
|
|
subject.active = true
|
|
|
|
end
|
2016-06-02 11:05:42 +05:30
|
|
|
|
|
|
|
it { is_expected.to validate_presence_of(:recipients) }
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when service is inactive' do
|
2017-09-10 17:25:29 +05:30
|
|
|
before do
|
|
|
|
subject.active = false
|
|
|
|
end
|
2016-06-02 11:05:42 +05:30
|
|
|
|
|
|
|
it { is_expected.not_to validate_presence_of(:recipients) }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|