Permalink
Browse files

Fix spacing issues in payments_spec

  • Loading branch information...
1 parent bda0c02 commit 2ed8e40f0619b85ef6d4a2231d9e699da9035c70 @radar radar committed Mar 29, 2012
Showing with 8 additions and 9 deletions.
  1. +8 −9 core/spec/requests/admin/orders/payments_spec.rb
@@ -1,13 +1,12 @@
require 'spec_helper'
describe "Payments" do
-
before(:each) do
reset_spree_preferences do |config|
config.allow_backorders = true
end
-
+
Spree::Zone.delete_all
shipping_method = Factory(:shipping_method, :zone => Factory(:zone, :name => 'North America'))
@order = Factory(:completed_order_with_totals, :number => "R100", :state => "complete", :shipping_method => shipping_method)
@@ -16,16 +15,16 @@
product.master.save
@order.add_variant(product.master, 2)
@order.update!
-
+
@order.inventory_units.each do |iu|
iu.update_attribute_without_callbacks('state', 'sold')
end
@order.update!
-
+
end
context "payment methods" do
-
+
before(:each) do
Factory(:payment, :order => @order, :amount => @order.outstanding_balance, :payment_method => Factory(:bogus_payment_method, :environment => 'test'))
visit spree.admin_path
@@ -34,7 +33,7 @@
end
it "should be able to list and create payment methods for an order", :js => true do
-
+
click_link "Payments"
within('#payment_status') { page.should have_content("Payment: balance due") }
find('table.index tbody tr:nth-child(2) td:nth-child(2)').text.should == "$39.98"
@@ -47,7 +46,7 @@
find('table.index tbody tr:nth-child(2) td:nth-child(2)').text.should == "$39.98"
find('table.index tbody tr:nth-child(2) td:nth-child(3)').text.should == "Credit Card"
find('table.index tbody tr:nth-child(2) td:nth-child(4)').text.should == "void"
-
+
click_on "New Payment"
page.should have_content("New Payment")
click_button "Update"
@@ -67,6 +66,6 @@
page.should have_content("You cannot create a payment for an order without any payment methods defined.")
page.should have_content("Please define some payment methods first.")
end
-
- end
+
+ end
end

0 comments on commit 2ed8e40

Please sign in to comment.