Adding some spec tweaks

This commit is contained in:
Will Marshall
2014-02-21 15:17:18 +11:00
parent 04ac6f466c
commit a162f4a108
2 changed files with 6 additions and 1 deletions

View File

@@ -162,7 +162,6 @@ feature "As a consumer I want to check out my cart", js: true do
it "re-renders with errors when we submit the incomplete form" do
click_button "Purchase"
current_path.should == "/shop/checkout"
save_and_open_page
page.should have_content "can't be blank"
end
end

View File

@@ -29,6 +29,12 @@ describe Spree::Address do
end
end
describe "setters" do
it "lets us set a country" do
expect { Spree::Address.new.country = "A country" }.to raise_error ActiveRecord::AssociationTypeMismatch
end
end
describe "notifying bugsnag when saved with missing data" do
it "notifies on create" do
Bugsnag.should_receive(:notify)