Skip to content

Commit

Permalink
removed hardcoded group_id in rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Nov 15, 2019
1 parent 927a13d commit ec0715b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class CopyOwnerIdToGroupIdForDashboards < ActiveRecord::Migration[5.1]
class MiqSet < ActiveRecord::Base; end
class MiqGroup < ActiveRecord::Base; end

def up
say_with_time("Copying owner_id to group_id in miq_sets table for each dashboard assigned to group") do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
describe CopyOwnerIdToGroupIdForDashboards do
let(:miq_set) { migration_stub(:MiqSet) }
let(:name) { "Hello Dashboard" }
let(:group_id) { 1 }
let(:group_id) do
group_stub = migration_stub(:MiqGroup)
group_stub.create!(:description => "GroupName").id
end

migration_context :up do
it "Copying owner_id to group_id in miq_sets table for each dashboard assigned to group only" do
Expand Down

0 comments on commit ec0715b

Please sign in to comment.