diff --git a/backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb b/backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb new file mode 100644 index 00000000000..ec999ca4578 --- /dev/null +++ b/backend/app/views/spree/admin/payments/source_views/_storecredit.html.erb @@ -0,0 +1,21 @@ +
diff --git a/backend/spec/features/admin/payments/store_credits_spec.rb b/backend/spec/features/admin/payments/store_credits_spec.rb new file mode 100644 index 00000000000..bb51fba8d29 --- /dev/null +++ b/backend/spec/features/admin/payments/store_credits_spec.rb @@ -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