From 0b3a184158b0907909cf03efd1a5130cc2245974 Mon Sep 17 00:00:00 2001 From: Mark Taylor <138604938+mtaylorgds@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:19:19 +0000 Subject: [PATCH 1/2] Update test name to match code changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A guide is no longer being created, simply an edition—update the test name to match. --- test/functional/editions_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/editions_controller_test.rb b/test/functional/editions_controller_test.rb index 7c6b016d2..c608c8d69 100644 --- a/test/functional/editions_controller_test.rb +++ b/test/functional/editions_controller_test.rb @@ -32,7 +32,7 @@ class EditionsControllerTest < ActionController::TestCase assert_response :not_found end - should "return a view for the requested guide" do + should "return a view for the requested edition" do get :show, params: { id: @edition.id } assert_response :success assert_not_nil assigns(:resource) From 7f2e0744f1e5cbe13f9f7caaabf8cb46c3df10fd Mon Sep 17 00:00:00 2001 From: Mark Taylor <138604938+mtaylorgds@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:20:08 +0000 Subject: [PATCH 2/2] Standardise tests in to use quoted state names --- test/integration/edition_edit_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/edition_edit_test.rb b/test/integration/edition_edit_test.rb index 8c841a226..d415c32df 100644 --- a/test/integration/edition_edit_test.rb +++ b/test/integration/edition_edit_test.rb @@ -37,7 +37,7 @@ class EditionEditTest < IntegrationTest end context "metadata tab" do - context "when state is draft" do + context "when state is 'draft'" do setup do visit_edition_in_draft click_link("Metadata") @@ -67,7 +67,7 @@ class EditionEditTest < IntegrationTest end end - context "when state state is not draft" do + context "when state is not 'draft'" do setup do visit_edition_in_published click_link("Metadata") @@ -103,7 +103,7 @@ class EditionEditTest < IntegrationTest visit_edition_in_draft end - context "when state is publish" do + context "when state is 'published'" do setup do visit_edition_in_published click_link("Unpublish") @@ -132,7 +132,7 @@ class EditionEditTest < IntegrationTest end end - context "when state is not publish" do + context "when state is not 'published'" do setup do edition = FactoryBot.create(:edition, state: "draft") visit edition_path(edition)