mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Stop setting host for url helpers in specs
This commit is contained in:
@@ -45,7 +45,6 @@ Openfoodnetwork::Application.configure do
|
||||
|
||||
# Print deprecation notices to the stderr
|
||||
config.active_support.deprecation = :stderr
|
||||
config.action_mailer.default_url_options = { :host => "test.host" }
|
||||
|
||||
# To block requests before running the database cleaner
|
||||
require 'open_food_network/rack_request_blocker'
|
||||
@@ -55,3 +54,4 @@ end
|
||||
|
||||
# Allows us to use _url helpers in Rspec
|
||||
Rails.application.routes.default_url_options[:host] = 'test.host'
|
||||
Spree::Core::Engine.routes.default_url_options[:host] = 'test.host'
|
||||
|
||||
@@ -12,7 +12,7 @@ describe Spree::Admin::ProductsController do
|
||||
end
|
||||
|
||||
it "denies access" do
|
||||
response.should redirect_to "http://test.host/unauthorized"
|
||||
response.should redirect_to spree.unauthorized_url
|
||||
end
|
||||
|
||||
it "does not update any product" do
|
||||
|
||||
@@ -6,7 +6,6 @@ describe UserPasswordsController do
|
||||
|
||||
before do
|
||||
@request.env["devise.mapping"] = Devise.mappings[:spree_user]
|
||||
ActionMailer::Base.default_url_options[:host] = "test.host"
|
||||
end
|
||||
|
||||
describe "create" do
|
||||
|
||||
@@ -204,7 +204,6 @@ feature %q{
|
||||
end
|
||||
|
||||
context "viewing the edit page" do
|
||||
before { Rails.application.routes.default_url_options[:host] = "test.host" }
|
||||
it "shows the dropdown menu" do
|
||||
distributor1.update_attribute(:abn, '12345678')
|
||||
order = create(:completed_order_with_totals, distributor: distributor1)
|
||||
|
||||
@@ -47,6 +47,9 @@ Capybara.default_max_wait_time = 30
|
||||
|
||||
require "paperclip/matchers"
|
||||
|
||||
# Override setting in Spree engine: Spree::Core::MailSettings
|
||||
ActionMailer::Base.default_url_options[:host] = 'test.host'
|
||||
|
||||
RSpec.configure do |config|
|
||||
# ## Mock Framework
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user