Merge branch 'master' into darkswarm_home

This commit is contained in:
Will Marshall
2014-04-24 10:52:33 +10:00
3 changed files with 6 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ describe Shop::CheckoutController do
it "returns errors" do
xhr :post, :update, order: {}, use_route: :spree
response.status.should == 400
response.body.should == {errors: assigns[:order].errors, flash: []}.to_json
response.body.should == {errors: assigns[:order].errors, flash: {}}.to_json
end
it "returns flash" do

View File

@@ -237,7 +237,9 @@ feature %q{
visit '/admin/products/bulk_edit'
find("a", text: "New Product").click
#save_screenshot "/Users/willmarshall/Desktop/foo.png"
#save_and_open_page
find("a", text: "NEW PRODUCT").click
page.should have_content 'NEW PRODUCT'

View File

@@ -5,7 +5,8 @@ describe CheckoutHelper do
it "generates html for validated inputs" do
helper.should_receive(:render).with(
partial: "shared/validated_input",
locals: {name: "test", path: "foo", required: true, type: :email}
locals: {name: "test", path: "foo",
attributes: {:required=>true, :type=>:email, :name=>"foo", :id=>"foo", "ng-model"=>"foo", "ng-class"=>"{error: !fieldValid('foo')}"}}
)
helper.validated_input("test", "foo", type: :email)