forked from Ada-C6/betsy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b13f664
commit c1931f4
Showing
3 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
require 'test_helper' | ||
|
||
class PaymentDetailsControllerTest < ActionController::TestCase | ||
# test "the truth" do | ||
# assert true | ||
test "should show payment detail" do | ||
get :show, {id: payment_details(:payment_card).id} | ||
assert_response :success | ||
end | ||
|
||
test "should get new" do | ||
get :new, order_id: payment_details(:payment_card).id | ||
|
||
assert_response :success | ||
end | ||
|
||
# test "should create payment detail" do | ||
# order_id = payment_details(:controller_test_card).order_id | ||
# # assert_difference('PaymentDetail.count', 1) do | ||
# post :create, { payment_detail: | ||
# { | ||
# order_id: order_id, | ||
# buyer_name: "Testing Person", | ||
# email: "[email protected]", | ||
# street: "Hauptstrasse", | ||
# city: "Hamburg", | ||
# state: "Germany", | ||
# zip: 54321, | ||
# cc_four_digits: 5105, | ||
# cc_expiration_date: "2017-10-24 13:53:49 -0700", | ||
# time_placed: "2016-10-24 12:53:49 -0700", | ||
# CVV: 111 | ||
# }, order_id: order_id | ||
# } | ||
# # end | ||
# | ||
# assert_response :redirect | ||
# assert_redirected_to payment_details_path | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,5 +36,19 @@ payment_card: | |
zip: 12345 | ||
cc_four_digits: xxxx | ||
cc_expiration_date: ???? | ||
time_placed: $$$$ | ||
time_placed: "2016-10-24 12:53:49 -0700" | ||
CVV: ??? | ||
|
||
controller_test_card: | ||
order: filter_order_complete_shipped | ||
buyer_name: "Ada Lovelace" | ||
email: "[email protected]" | ||
street: "Fourth Avenue" | ||
city: "Seattle" | ||
state: "WA" | ||
zip: 12345 | ||
cc_four_digits: xxxx | ||
cc_expiration_date: ???? | ||
time_placed: "2016-10-24 12:53:49 -0700" | ||
CVV: ??? | ||
|