From 9e67bd582491cf1938c48e9662c42ea264e0eb2e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 26 May 2023 10:40:50 +0200 Subject: [PATCH] Use specified values to be sure they aren't empty --- spec/system/admin/enterprises_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/system/admin/enterprises_spec.rb b/spec/system/admin/enterprises_spec.rb index 20fa1518ac..4cc34a1172 100644 --- a/spec/system/admin/enterprises_spec.rb +++ b/spec/system/admin/enterprises_spec.rb @@ -751,7 +751,10 @@ describe ' end context "when custom tab is already created" do - let(:custom_tab) { create(:custom_tab) } + let(:custom_tab) { + create(:custom_tab, title: "Custom tab title", + content: "Custom tab content") + } before do distributor1.update(custom_tab: custom_tab) @@ -764,8 +767,8 @@ describe ' it "display the custom tab fields with the current values" do expect(page).to have_checked_field "Create custom tab in shopfront" expect(page). - to have_field "enterprise_custom_tab_attributes_title", with: custom_tab.title - expect(page).to have_content(custom_tab.content) + to have_field "enterprise_custom_tab_attributes_title", with: "Custom tab title" + expect(page).to have_content("Custom tab content") end it "can delete custom tab if uncheck the checkbox" do