diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-26 06:09:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-26 06:09:56 +0000 |
commit | f88f72df028c02be399ecf3d32c7cf0d8404784f (patch) | |
tree | 1a9a607f7a7915302a6f6ec296760279a2d0bb09 /spec/models/design_management | |
parent | c2d7378a6896085f1f2d27c95455fc9728881e60 (diff) | |
download | gitlab-ce-f88f72df028c02be399ecf3d32c7cf0d8404784f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/design_management')
-rw-r--r-- | spec/models/design_management/action_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/design_management/action_spec.rb b/spec/models/design_management/action_spec.rb index 0a8bbc8d26e..f2b8fcaa256 100644 --- a/spec/models/design_management/action_spec.rb +++ b/spec/models/design_management/action_spec.rb @@ -49,6 +49,15 @@ RSpec.describe DesignManagement::Action do end end + describe '.with_version' do + it 'preloads the version' do + actions = described_class.with_version + + expect { actions.map(&:version) }.not_to exceed_query_limit(2) + expect(actions.count).to be > 2 + end + end + describe '.by_event' do it 'returns the actions by event type' do expect(described_class.by_event(:deletion)).to match_array([action_a_2, action_c]) |