summaryrefslogtreecommitdiff
path: root/billing/app/views
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-07-02 17:14:32 +0200
committerAzul <azul@leap.se>2013-07-17 10:47:14 +0200
commit1e4245907ca17d1d6afbeca82b25c35c970ba499 (patch)
tree432d9012731d2f35b704541f1fd976aaef2ae92f /billing/app/views
parent968448cea22364f1fd423cedc54cf6d8a0f2e09e (diff)
billing: functional test for payments controller
Diffstat (limited to 'billing/app/views')
-rw-r--r--billing/app/views/customer/edit.html.haml4
-rw-r--r--billing/app/views/payments/_customer_data.html.haml8
2 files changed, 6 insertions, 6 deletions
diff --git a/billing/app/views/customer/edit.html.haml b/billing/app/views/customer/edit.html.haml
index dfc932e..f11e948 100644
--- a/billing/app/views/customer/edit.html.haml
+++ b/billing/app/views/customer/edit.html.haml
@@ -2,7 +2,7 @@
#total-errors{:style => "color:red;"}
= h(@result.errors.size)
error(s)
-= form_for :customer, :url => Braintree::TransparentRedirect.url, :params => @result && @result.params[:customer],:existing => @customer, :builder => BraintreeHelper::BraintreeFormBuilder, :errors => @result && @result.errors.for(:customer) do |f| |
+= form_for :customer, url: Braintree::TransparentRedirect.url, params: @result && @result.params[:customer], existing: @customer, builder: BraintreeFormHelper::BraintreeFormBuilder, errors: @result && @result.errors.for(:customer) do |f| |
= field_set_tag "Customer" do
%dl
%dt= f.label :first_name, 'First Name'
@@ -19,4 +19,4 @@
= link_to 'Change credit card', edit_credit_card_info_path(:id => @default_cc.token), :class => :btn
= hidden_field_tag :tr_data, @tr_data
= f.submit 'Save Customer Info', :class => :btn
-= link_to 'Show Customer Information', show_customer_path(@braintree_data.id), :class=> :btn \ No newline at end of file
+= link_to 'Show Customer Information', show_customer_path(@customer), :class=> :btn
diff --git a/billing/app/views/payments/_customer_data.html.haml b/billing/app/views/payments/_customer_data.html.haml
index d46065c..71a5eaf 100644
--- a/billing/app/views/payments/_customer_data.html.haml
+++ b/billing/app/views/payments/_customer_data.html.haml
@@ -1,15 +1,15 @@
%h2 Customer Information
%dl
%dt First Name
- %dd= @braintree_data.first_name
+ %dd= @customer.first_name
%dt Last Name
- %dd= @braintree_data.last_name
+ %dd= @customer.last_name
%dt Phone
- %dd= @braintree_data.phone
+ %dd= @customer.phone
%h2 Credit Card Information
%dl
%dt Number
%dd= @default_cc.masked_number
%dt Expiration Date
%dd= @default_cc.expiration_date
-= link_to 'Edit Saved Data', edit_customer_path(@customer.braintree_customer_id), :class => :btn
+= link_to 'Edit Saved Data', edit_customer_path(@customer), :class => :btn