Skip to content

Commit

Permalink
GL-106: Restrict Category assessment screen only to xi service
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasika.Abeyrathna authored and Rasika.Abeyrathna committed Apr 4, 2024
1 parent a7bb2e7 commit 48dc080
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ def index
end

private

def check_service
if TradeTariffAdmin::ServiceChooser.uk?
raise ActionController::RoutingError, 'Invalid service'
end
end

end
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
let(:category_assessment) { build :category_assessment }
let(:create_user) { create :user, permissions: ['signin', 'HMRC Editor'] }

before do
allow(TradeTariffAdmin::ServiceChooser).to receive(:service_choice).and_return 'xi'
end

describe 'GET #index' do
before do
stub_api_request('/admin/category_assessments?page=1', backend: 'xi').and_return \
Expand Down

0 comments on commit 48dc080

Please sign in to comment.