Commit 547a7795 authored by Thong Kuah's avatar Thong Kuah Committed by Kamil Trzciński

Fix some cross-db modifications in specs

parent d994607e
...@@ -15,8 +15,9 @@ RSpec.describe Resolvers::PackagePipelinesResolver do ...@@ -15,8 +15,9 @@ RSpec.describe Resolvers::PackagePipelinesResolver do
subject { resolve(described_class, obj: package, args: args, ctx: { current_user: user }) } subject { resolve(described_class, obj: package, args: args, ctx: { current_user: user }) }
before do before do
package.pipelines = pipelines pipelines.each do |pipeline|
package.save! create(:package_build_info, package: package, pipeline: pipeline)
end
end end
it { is_expected.to contain_exactly(*pipelines) } it { is_expected.to contain_exactly(*pipelines) }
......
...@@ -145,8 +145,9 @@ RSpec.describe 'package details' do ...@@ -145,8 +145,9 @@ RSpec.describe 'package details' do
let(:pipeline_gids) { pipelines.sort_by(&:id).map(&:to_gid).map(&:to_s).reverse } let(:pipeline_gids) { pipelines.sort_by(&:id).map(&:to_gid).map(&:to_s).reverse }
before do before do
composer_package.pipelines = pipelines pipelines.each do |pipeline|
composer_package.save! create(:package_build_info, package: composer_package, pipeline: pipeline)
end
end end
def run_query(args) def run_query(args)
......
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