mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Moving permalink check action to enterprise controller
This commit is contained in:
@@ -282,27 +282,5 @@ module Admin
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "checking permalink suitability" do
|
||||
# let(:enterprise) { create(:enterprise, permalink: 'enterprise_permalink') }
|
||||
|
||||
before do
|
||||
controller.stub spree_current_user: admin_user
|
||||
end
|
||||
|
||||
it "responds with status of 200 when the route does not exist" do
|
||||
spree_get :check_permalink, { permalink: 'some_nonexistent_route', format: :js }
|
||||
expect(response.status).to be 200
|
||||
end
|
||||
|
||||
it "responds with status of 409 when the permalink matches an existing route" do
|
||||
# spree_get :check_permalink, { permalink: 'enterprise_permalink', format: :js }
|
||||
# expect(response.status).to be 409
|
||||
spree_get :check_permalink, { permalink: 'map', format: :js }
|
||||
expect(response.status).to be 409
|
||||
spree_get :check_permalink, { permalink: '', format: :js }
|
||||
expect(response.status).to be 409
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user