Commit e11b2ec7 by vulehuan

rspec: card - step 2: click product name

parent ef866f1c
......@@ -267,6 +267,14 @@ describe "CardPages" do
end
describe "when click product name" do
let(:product) { Product.first }
before do
visit url_for(controller: 'cards', action: 'checkout')
page.find(:xpath, "//a[@href='#{product_url(product)}']").click
end
it { should have_title(product.name) }
it { should have_xpath("//a[@href='#{cards_path(product_id: product.id)}']") }
end
describe "calculate price" do
......
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