diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 00:07:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 00:07:41 +0000 |
commit | 42263d6451c0af3c0e7a61747ffb046a806e4477 (patch) | |
tree | 989941de7bbf543963942e7d9a4b1b89bdf7e386 /spec/models/resource_weight_event_spec.rb | |
parent | 2412ddf03da787012161ea1e8a03787275f9cde9 (diff) | |
download | gitlab-ce-42263d6451c0af3c0e7a61747ffb046a806e4477.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/resource_weight_event_spec.rb')
-rw-r--r-- | spec/models/resource_weight_event_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/resource_weight_event_spec.rb b/spec/models/resource_weight_event_spec.rb index 2f00204512e..11b633e1dcf 100644 --- a/spec/models/resource_weight_event_spec.rb +++ b/spec/models/resource_weight_event_spec.rb @@ -3,6 +3,9 @@ require 'spec_helper' RSpec.describe ResourceWeightEvent, type: :model do + it_behaves_like 'a resource event' + it_behaves_like 'a resource event for issues' + let_it_be(:user1) { create(:user) } let_it_be(:user2) { create(:user) } @@ -11,13 +14,11 @@ RSpec.describe ResourceWeightEvent, type: :model do let_it_be(:issue3) { create(:issue, author: user2) } describe 'validations' do - it { is_expected.not_to allow_value(nil).for(:user) } it { is_expected.not_to allow_value(nil).for(:issue) } it { is_expected.to allow_value(nil).for(:weight) } end describe 'associations' do - it { is_expected.to belong_to(:user) } it { is_expected.to belong_to(:issue) } end |