From 636692f9921bd695d726695d2d46c91f5a6e56f3 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 11 Apr 2014 10:03:19 +0200 Subject: move engines into engines directory Also renamed help to support so it's harder to confuse it with documentation --- engines/billing/test/broken/admin_customer_test.rb | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 engines/billing/test/broken/admin_customer_test.rb (limited to 'engines/billing/test/broken/admin_customer_test.rb') diff --git a/engines/billing/test/broken/admin_customer_test.rb b/engines/billing/test/broken/admin_customer_test.rb new file mode 100644 index 0000000..df92a0d --- /dev/null +++ b/engines/billing/test/broken/admin_customer_test.rb @@ -0,0 +1,31 @@ +require 'test_helper' +require 'fake_braintree' + +class AdminCustomerTest < BraintreeIntegrationTest + + setup do + @admin = User.find_by_login('admin') || FactoryGirl.create(:user, login: 'admin') + @user = FactoryGirl.create(:user) + end + + teardown do + @user.destroy if @user + @admin.destroy if @admin + end + + test "check non customer as admin" do + login_as @admin + visit '/' + click_link 'Users' + click_link @user.login + click_link 'Billing Settings' + assert page.has_content? @user.email_address + assert page.has_content? 'No Saved Customer' + end + + test "check customer as admin" do + skip "cannot check customer as admin" + # it would be good to have a test where an admin tries to view the 'Billing Settings' for another user. + # However, partially due to limitations of FakeBraintree, this doesn't seem pursuing at this time. + end +end -- cgit v1.2.3