Merge pull request #7914 from betagouv/fix_flaky_spec

refactor(spec): use match_array
This commit is contained in:
Paul Chavard 2022-10-14 10:18:36 +02:00 committed by GitHub
commit b0db7e7cb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_10_07_113737) do ActiveRecord::Schema.define(version: 2022_10_13_142432) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto" enable_extension "pgcrypto"
@ -874,11 +874,11 @@ ActiveRecord::Schema.define(version: 2022_10_07_113737) do
end end
create_table "zone_labels", force: :cascade do |t| create_table "zone_labels", force: :cascade do |t|
t.bigint "zone_id", null: false t.datetime "created_at", precision: 6, null: false
t.date "designated_on", null: false t.date "designated_on", null: false
t.string "name", null: false t.string "name", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.bigint "zone_id", null: false
t.index ["zone_id"], name: "index_zone_labels_on_zone_id" t.index ["zone_id"], name: "index_zone_labels_on_zone_id"
end end

View file

@ -176,7 +176,7 @@ describe Administrateurs::GroupeInstructeursController, type: :controller do
end end
it { expect { subject }.to raise_error(ActiveRecord::RecordNotFound) } it { expect { subject }.to raise_error(ActiveRecord::RecordNotFound) }
it { expect(bulk_message.groupe_instructeurs).to eq([gi_1_1, gi_1_3]) } it { expect(bulk_message.groupe_instructeurs).to match_array([gi_1_1, gi_1_3]) }
end end
end end