diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-28 14:41:00 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-30 11:44:20 +0300 |
commit | 31b0e53015e38e51d9c02cca85c9279600b1bf85 (patch) | |
tree | 2b0e9dcdb9ba11099b13fc790677bb59052d47fc /spec/models/notification_setting_spec.rb | |
parent | a9346cab20f7e54a849877e2aa8601b8b3707652 (diff) |
Introduce NotificationSetting model
It will hold notification setting per group or per project. It will
allow get rid of notification level stored in Member model
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 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/notification_setting_spec.rb b/spec/models/notification_setting_spec.rb new file mode 100644 index 00000000000..f9d668ed75b --- /dev/null +++ b/spec/models/notification_setting_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +RSpec.describe NotificationSetting, type: :model do + describe "Associations" do + it { is_expected.to belong_to(:user) } + end + + describe "Validation" do + subject { NotificationSetting.new } + + it { is_expected.to validate_presence_of(:user) } + it { is_expected.to validate_presence_of(:source) } + it { is_expected.to validate_presence_of(:level) } + end +end |