Skip to content

Commit

Permalink
Add test for store credit source view
Browse files Browse the repository at this point in the history
  • Loading branch information
adammathys committed Jul 24, 2015
1 parent 68de2f9 commit 9674282
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/spec/features/admin/payments/store_credits_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'spec_helper'

RSpec.describe 'Store credits', type: :feature do
stub_authorization!

let(:order) { FactoryGirl.create(:completed_order_with_totals) }
let(:payment) do
FactoryGirl.create(
:store_credit_payment,
order: order,
amount: 20
)
end

it "viewing a store credit payment" do
visit spree.admin_order_payment_path(order, payment)

expect(page).to have_content "Store Credit"
expect(page).to have_content "Amount: $20.00"
end
end

0 comments on commit 9674282

Please sign in to comment.