Skip to content

Instantly share code, notes, and snippets.

@lukaszx0
Created September 23, 2010 11:39
Show Gist options
  • Save lukaszx0/593497 to your computer and use it in GitHub Desktop.
Save lukaszx0/593497 to your computer and use it in GitHub Desktop.
require 'test_helper'
class ProductsIntegrationTest < ActionController::IntegrationTest
test "browse product page" do
product = Factory.create(:product)
visit product_path(product)
within(:css, ".products.show .product") do
assert_content "Textmate", "h3 a"
assert_content "1 000,00 netto", ".price .without_tax"
assert_content "1 220,00 brutto", ".price .with_tax"
assert_content "Cool text editor", "div.description span.short"
assert_content "for mac os x", "div.description span.expanded"
end
within(:css, ".product .product_manager") do
assert_content "Jan Kowalski"
assert_content "[email protected]"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment