summaryrefslogtreecommitdiff
path: root/spec/models/notification_setting_spec.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-12-03 20:10:13 +0900
committerShinya Maeda <shinya@gitlab.com>2018-12-03 20:10:13 +0900
commitdd4a8df4cb5da30bf918725143f3e038a6fa7a79 (patch)
tree31631d69b0cf87d105ec4ed6b56ab9ebe370c1b0 /spec/models/notification_setting_spec.rb
parenta445aa0a9267f191fab1c46d438b42fbec549da5 (diff)
downloadgitlab-ce-dd4a8df4cb5da30bf918725143f3e038a6fa7a79.tar.gz
Validate enum uniqueness
Diffstat (limited to 'spec/models/notification_setting_spec.rb')
-rw-r--r--spec/models/notification_setting_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/models/notification_setting_spec.rb b/spec/models/notification_setting_spec.rb
index e545b674b4f..ad09172e36a 100644
--- a/spec/models/notification_setting_spec.rb
+++ b/spec/models/notification_setting_spec.rb
@@ -6,6 +6,8 @@ RSpec.describe NotificationSetting do
it { is_expected.to belong_to(:source) }
end
+ it_behaves_like 'Unique enum values'
+
describe "Validation" do
subject { described_class.new(source_id: 1, source_type: 'Project') }