diff --git a/app/views/spree/admin/tax_categories/index.html.haml b/app/views/spree/admin/tax_categories/index.html.haml index 9ee1d1e4c4..44523eb5e8 100644 --- a/app/views/spree/admin/tax_categories/index.html.haml +++ b/app/views/spree/admin/tax_categories/index.html.haml @@ -10,7 +10,7 @@ %table#listing_tax_categories.index %colgroup - %col{style => "width: 30%"}/ + %col{style: "width: 30%"}/ %col{style: "width: 40%"}/ %col{style: "width: 15%"}/ %col{style: "width: 15%"}/ diff --git a/spec/features/admin/configuration/tax_categories_spec.rb b/spec/features/admin/configuration/tax_categories_spec.rb index d4ddfcaa22..f3e3ec4f67 100644 --- a/spec/features/admin/configuration/tax_categories_spec.rb +++ b/spec/features/admin/configuration/tax_categories_spec.rb @@ -1,9 +1,10 @@ require 'spec_helper' describe "Tax Categories" do - stub_authorization! + include AuthenticationWorkflow before(:each) do + quick_login_as_admin visit spree.admin_path click_link "Configuration" end diff --git a/spec/features/admin/configuration/tax_rates_spec.rb b/spec/features/admin/configuration/tax_rates_spec.rb index 51b074b134..9e64d2cb7a 100644 --- a/spec/features/admin/configuration/tax_rates_spec.rb +++ b/spec/features/admin/configuration/tax_rates_spec.rb @@ -1,18 +1,20 @@ require 'spec_helper' describe "Tax Rates" do - stub_authorization! + include AuthenticationWorkflow - let!(:tax_rate) { create(:tax_rate, :calculator => stub_model(Spree::Calculator)) } + let!(:calculator) { create(:calculator_per_item, calculable: create(:order)) } + let!(:tax_rate) { create(:tax_rate, calculator: calculator) } before do + quick_login_as_admin visit spree.admin_path click_link "Configuration" end # Regression test for #535 it "can see a tax rate in the list if the tax category has been deleted" do - tax_rate.tax_category.update_column(:deleted_at, Time.now) + tax_rate.tax_category.update_column(:deleted_at, Time.zone.now) lambda { click_link "Tax Rates" }.should_not raise_error within("table tbody td:nth-child(3)") do page.should have_content("N/A") @@ -23,7 +25,7 @@ describe "Tax Rates" do it "can create a new tax rate" do click_link "Tax Rates" click_link "New Tax Rate" - fill_in "Rate", :with => "0.05" + fill_in "Rate", with: "0.05" click_button "Create" page.should have_content("Tax Rate has been successfully created!") end