From 18b9c3b0b4289b9fbda5ffc3ae1d37222e542b4a Mon Sep 17 00:00:00 2001 From: Leena Gupte Date: Tue, 24 Sep 2024 14:09:51 +0100 Subject: [PATCH] Fix up to system tests --- spec/system/travel_advice_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/system/travel_advice_spec.rb b/spec/system/travel_advice_spec.rb index 8cdc1e871b..dc2028fd6f 100644 --- a/spec/system/travel_advice_spec.rb +++ b/spec/system/travel_advice_spec.rb @@ -142,17 +142,17 @@ it "displays latest updates" do visit @base_path - expect(page).to have_css("h1", text: @content_item["details"]["parts"].first["title"]) + expect(page).to have_css("h1", text: @content_store_response["details"]["parts"].first["title"]) expect(page).to have_text("The main opposition party has called for mass protests against the government in Tirana on 18 February 2017.") expect(page).to have_content(I18n.t("formats.travel_advice.still_current_at")) expect(page).to have_content(Time.zone.today.strftime("%-d %B %Y")) expect(page).to have_content(I18n.t("formats.travel_advice.updated")) - expect(page).to have_content(Date.parse(@content_item.reviewed_at).strftime("%-d %B %Y")) + expect(page).to have_content(Date.parse(@content_store_response["details"]["reviewed_at"]).strftime("%-d %B %Y")) within ".gem-c-metadata" do - expect(page).to have_content(@content_item["details"]["change_description"].gsub("Latest update: ", "").strip) + expect(page).to have_content(@content_store_response["details"]["change_description"].gsub("Latest update: ", "").strip) end end