From 48985bbcd19f65641c233848a1e03217a6b203c1 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Thu, 7 May 2020 19:59:47 +0100 Subject: [PATCH] Use patch instead of put, because it's rails 4 Extend the registration process spec to cover package selection --- config/routes/admin.rb | 2 +- spec/features/consumer/registration_spec.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 3456248e25..931015e302 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -27,7 +27,7 @@ Openfoodnetwork::Application.routes.draw do member do get :welcome - put :register + patch :register end resources :producer_properties do diff --git a/spec/features/consumer/registration_spec.rb b/spec/features/consumer/registration_spec.rb index e4bf198637..ed0c2f96b1 100644 --- a/spec/features/consumer/registration_spec.rb +++ b/spec/features/consumer/registration_spec.rb @@ -124,6 +124,10 @@ feature "Registration", js: true do click_link "Go to Enterprise Dashboard" expect(page).to have_content "CHOOSE YOUR PACKAGE" + + page.find('.full_hub h3').click + click_button "Select and Continue" + expect(page).to have_content "Your profile live" end context "when the user has no more remaining enterprises" do