Commit 8f453dc8 by vulehuan

rspec: card - step 1 - click product name

parent 1632b53f
......@@ -143,6 +143,14 @@ describe "CardPages" do
end
describe "when click product name" do
let(:product) { Product.first }
before do
visit cards_path
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
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