diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-07-24 19:26:15 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-07-24 19:26:15 +0300 |
commit | 3a0b9e06e1dd5f6141a6f04dd2b39dbb803c07f1 (patch) | |
tree | 3db369acec13cf268553d051614ca95dbfc7c69d /spec/models/notification_setting_spec.rb | |
parent | cc577b89706686063d4ff0d86a11c63b6570231c (diff) |
Adjust tests to work with latest shoulda gem
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/notification_setting_spec.rb')
-rw-r--r-- | spec/models/notification_setting_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/notification_setting_spec.rb b/spec/models/notification_setting_spec.rb index 74fa1c1f926..76a7b07949f 100644 --- a/spec/models/notification_setting_spec.rb +++ b/spec/models/notification_setting_spec.rb @@ -13,7 +13,9 @@ RSpec.describe NotificationSetting, type: :model do it { is_expected.to validate_presence_of(:level) } describe 'user_id' do - before { subject.user = create(:user) } + before do + subject.user = create(:user) + end it { is_expected.to validate_uniqueness_of(:user_id).scoped_to([:source_type, :source_id]).with_message(/already exists in source/) } end |