Commit cb9d4cf3 by vulehuan

rspec: card - step 2: click continue with valid infos

parent 14ccbf2f
<table class="table table-hover"> <table class="table table-hover card-item-list">
<thead> <thead>
<tr> <tr>
<td>No.</td> <td>No.</td>
......
...@@ -182,7 +182,7 @@ describe "CardPages" do ...@@ -182,7 +182,7 @@ describe "CardPages" do
page.find('.product-detail').click_link('Order') page.find('.product-detail').click_link('Order')
end end
end end
# let(:customer_info) { FactoryGirl.create(:my_card) }
describe "with invalid information" do describe "with invalid information" do
describe "when fullname is not present" do describe "when fullname is not present" do
before do before do
...@@ -241,6 +241,16 @@ describe "CardPages" do ...@@ -241,6 +241,16 @@ describe "CardPages" do
end end
describe "with valid information" do describe "with valid information" do
before do
visit url_for(controller: 'cards', action: 'checkout')
fill_in_order_form()
click_button "Continue"
end
it { should have_title(full_title('Confirmation')) }
it { should have_selector('h2', text: 'Confirmation') }
it { should have_content('Please check your information:') }
it { should have_selector('.card-item-list') }
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment