diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-02 22:51:03 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-02 22:51:03 +0100 |
commit | 648826721f13ee4309a11638e538d96006648b39 (patch) | |
tree | 9e2cb1b728208671c4d653d32223a02d19f3fe82 /spec/models/user_callout_spec.rb | |
parent | 838cc0907c963a025553d639283b3bbf8140dae8 (diff) | |
download | gitlab-ce-648826721f13ee4309a11638e538d96006648b39.tar.gz |
Rename Callout to UserCallout
Diffstat (limited to 'spec/models/user_callout_spec.rb')
-rw-r--r-- | spec/models/user_callout_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/user_callout_spec.rb b/spec/models/user_callout_spec.rb new file mode 100644 index 00000000000..b39d12e48ac --- /dev/null +++ b/spec/models/user_callout_spec.rb @@ -0,0 +1,16 @@ +require 'rails_helper' + +describe UserCallout do + let!(:callout) { create(:user_callout) } + + describe 'relationships' do + it { is_expected.to belong_to(:user) } + end + + describe 'validations' do + it { is_expected.to validate_presence_of(:user) } + + it { is_expected.to validate_presence_of(:feature_name) } + it { is_expected.to validate_uniqueness_of(:feature_name).scoped_to(:user_id) } + end +end |