From fd26056617e72c5a628b11098e960e8a9dcaf1c5 Mon Sep 17 00:00:00 2001 From: Jamie Date: Wed, 4 Dec 2024 15:55:33 +0000 Subject: [PATCH] Minimise duplicated code --- ...port_user_marks_a_claim_as_provider_not_approved_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/system/claims/support/claims/sampling/support_user_marks_a_claim_as_provider_not_approved_spec.rb b/spec/system/claims/support/claims/sampling/support_user_marks_a_claim_as_provider_not_approved_spec.rb index 253a14195..d1564b58f 100644 --- a/spec/system/claims/support/claims/sampling/support_user_marks_a_claim_as_provider_not_approved_spec.rb +++ b/spec/system/claims/support/claims/sampling/support_user_marks_a_claim_as_provider_not_approved_spec.rb @@ -69,6 +69,8 @@ def then_i_see_the_details_of_the_claim def when_i_click_on_confirm_provider_rejected_claim click_on "Confirm provider rejected claim" end + alias_method :and_i_click_on_confirm_provider_rejected_claim, + :when_i_click_on_confirm_provider_rejected_claim def then_i_see_the_confirmation_page expect(page).to have_title( @@ -84,10 +86,6 @@ def when_i_click_on_cancel click_on "Cancel" end - def and_i_click_on_confirm_provider_rejected_claim - click_on "Confirm provider rejected claim" - end - def then_i_see_that_the_claim_has_been_updated_to_provider_not_approved expect(page).to have_current_path(claims_support_claims_sampling_path(@claim), ignore_query: true) expect(page).to have_title(