From 353da45b6fdc7d21b6338c5b4ab231f29a19df62 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 27 Aug 2020 09:36:51 +0800 Subject: [PATCH] Fix failing test. --- spec/guardian_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/guardian_spec.rb b/spec/guardian_spec.rb index a7061ce..a5f24c8 100644 --- a/spec/guardian_spec.rb +++ b/spec/guardian_spec.rb @@ -8,12 +8,11 @@ describe Guardian do def make_query(group_ids = []) query = DataExplorer::Query.create!(name: "Query number #{Fabrication::Sequencer.sequence("query-id", 1)}", sql: "SELECT 1") + group_ids.each do |group_id| query.query_groups.create!(group_id: group_id) end - group_ids.each do |group_id| - query.query_groups.create!(group_id: group_id) - end + query end