From 61ff01824400188ddf281f2bf0faaf31330c4046 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Sun, 30 May 2021 18:30:51 +0530 Subject: [PATCH] added spec --- spec/extensions/extra_locales_controller_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/extensions/extra_locales_controller_spec.rb b/spec/extensions/extra_locales_controller_spec.rb index 91a4e8c3..a71e39c4 100644 --- a/spec/extensions/extra_locales_controller_spec.rb +++ b/spec/extensions/extra_locales_controller_spec.rb @@ -37,6 +37,13 @@ describe ExtraLocalesControllerCustomWizard, type: :request do expect(response.status).to eq(200) end + it "returns wizard locales when requested by user in a wizard step" do + sign_in(new_user) + + get @locale_url, headers: { 'REFERER' => "/w/super-mega-fun-wizard/steps/step_1" } + expect(response.status).to eq(200) + end + it "return wizard locales if user cant access wizard" do template[:permitted] = permitted["permitted"] CustomWizard::Template.save(template.as_json)