Commit 1c0faeb6 authored by Stan Hu's avatar Stan Hu

Merge branch 'jh-remove-test-db-queries-from-mr-validations' into 'master'

Use build_stubbed to remove unnecessary db queries in mr validations

See merge request gitlab-org/gitlab!36575
parents 2db1cf6f d7f518b7
......@@ -197,6 +197,8 @@ RSpec.describe MergeRequest do
end
describe 'validation' do
subject { build_stubbed(:merge_request) }
it { is_expected.to validate_presence_of(:target_branch) }
it { is_expected.to validate_presence_of(:source_branch) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment