Commit a09377e4 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'fix-package-spec' into 'master'

Use parent strategy for associations in factories - Package spec

See merge request gitlab-org/gitlab!41359
parents cdb1b2e4 c9de2a4d
......@@ -264,7 +264,7 @@ RSpec.describe Packages::Package, type: :model do
let!(:package) { create(:npm_package) }
it 'will not allow a package of the same name' do
new_package = build(:npm_package, name: package.name)
new_package = build(:npm_package, project: create(:project), name: package.name)
expect(new_package).not_to be_valid
end
......
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