summaryrefslogtreecommitdiff
path: root/spec/models/project_services/chat_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_services/chat_service_spec.rb')
-rw-r--r--spec/models/project_services/chat_service_spec.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/models/project_services/chat_service_spec.rb b/spec/models/project_services/chat_service_spec.rb
index e6314a43501..c6a45a3e1be 100644
--- a/spec/models/project_services/chat_service_spec.rb
+++ b/spec/models/project_services/chat_service_spec.rb
@@ -2,7 +2,14 @@ require 'spec_helper'
describe ChatService, models: true do
describe "Associations" do
- before { allow(subject).to receive(:activated?).and_return(true) }
- it { is_expected.to validate_presence_of :webhook }
+ it { is_expected.to have_many :chat_names }
+ end
+
+ describe '#valid_token?' do
+ subject { described_class.new }
+
+ it 'is false as it has no token' do
+ expect(subject.valid_token?('wer')).to be_falsey
+ end
end
end