summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-02-02 15:04:02 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-02-16 09:17:40 +0100
commit297dc70158f905fef4557d1ee6510bcf459a08a9 (patch)
treeb35fa5508d947f1d19e644ac9b1149145f9bb45a /spec/models
parente90ec73f651ca6153a72437d4dd01f60c38839da (diff)
downloadgitlab-ce-297dc70158f905fef4557d1ee6510bcf459a08a9.tar.gz
Create MM team for GitLab group
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/chat_team_spec.rb10
-rw-r--r--spec/models/group_spec.rb1
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/chat_team_spec.rb b/spec/models/chat_team_spec.rb
new file mode 100644
index 00000000000..37a22f5cd6d
--- /dev/null
+++ b/spec/models/chat_team_spec.rb
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe ChatTeam, type: :model do
+ # Associations
+ it { is_expected.to belong_to(:group) }
+
+ # Fields
+ it { is_expected.to respond_to(:name) }
+ it { is_expected.to respond_to(:team_id) }
+end
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index a4e6eb4e3a6..8cfc2085458 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -13,6 +13,7 @@ describe Group, models: true do
it { is_expected.to have_many(:shared_projects).through(:project_group_links) }
it { is_expected.to have_many(:notification_settings).dependent(:destroy) }
it { is_expected.to have_many(:labels).class_name('GroupLabel') }
+ it { is_expected.to have_one(:chat_team) }
describe '#members & #requesters' do
let(:requester) { create(:user) }