Commit c9de2a4d authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by Eugenia Grieff

Fix package spec

This validation requires a persisted project
parent bba75738
......@@ -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