Sha256: 6d710bde45b32f38ee4b36586ad0ea6990182bceb8d7b1534f8207312f3b778b
Contents?: true
Size: 1.09 KB
Versions: 25
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' module Spree module Admin describe StockLocationsController, :type => :controller do stub_authorization! # Regression for #4272 context "with no countries present" do it "cannot create a new stock location" do spree_get :new expect(flash[:error]).to eq(Spree.t(:stock_locations_need_a_default_country)) expect(response).to redirect_to(spree.admin_stock_locations_path) end end context "with a default country present" do before do country = FactoryGirl.create(:country) Spree::Config[:default_country_id] = country.id end it "can create a new stock location" do spree_get :new expect(response).to be_success end end context "with a country with the ISO code of 'US' existing" do before do FactoryGirl.create(:country, iso: 'US') end it "can create a new stock location" do spree_get :new expect(response).to be_success end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems