diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-19 18:04:38 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:57:14 +0300 |
commit | d820c090ec85f8118e4cea75bd63d800e812ea25 (patch) | |
tree | 63ab9b40c13f1a44add19cad9d40f4c58f7f31c8 /spec/models | |
parent | d927336403a92d340d7e5b2d2328c5a0e029d666 (diff) |
Add GroupLabel model
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/group_label_spec.rb | 11 | ||||
-rw-r--r-- | spec/models/group_spec.rb | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/group_label_spec.rb b/spec/models/group_label_spec.rb new file mode 100644 index 00000000000..a82d23bcc0b --- /dev/null +++ b/spec/models/group_label_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe GroupLabel, models: true do + describe 'relationships' do + it { is_expected.to belong_to(:group) } + end + + describe 'validations' do + it { is_expected.to validate_presence_of(:group) } + end +end diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 0b3ef9b98fd..ac862055ebc 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -12,6 +12,7 @@ describe Group, models: true do it { is_expected.to have_many(:project_group_links).dependent(:destroy) } 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') } describe '#members & #requesters' do let(:requester) { create(:user) } |