Moving permalink check action to enterprise controller

This commit is contained in:
Rob Harrington
2015-01-14 14:26:21 +11:00
parent e2268e53bb
commit c330e49a7f
5 changed files with 32 additions and 36 deletions

View File

@@ -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