34 lines
711 B
Ruby
34 lines
711 B
Ruby
require "test_helper"
|
|
|
|
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
|
|
|
|
def setup
|
|
@base_title = "Ruby on Rails Tutorial Sample App"
|
|
end
|
|
|
|
test "should get root" do
|
|
get root_path
|
|
assert_response :success
|
|
assert_select "title", "Home | #{@base_title}"
|
|
end
|
|
|
|
test "should get help" do
|
|
get help_path
|
|
assert_response :success
|
|
assert_select "title", "Help | #{@base_title}"
|
|
end
|
|
|
|
test "Should get about" do
|
|
get about_path
|
|
assert_response :success
|
|
assert_select "title", "About | #{@base_title}"
|
|
end
|
|
|
|
test "Should get contact" do
|
|
get contact_path
|
|
assert_response :success
|
|
assert_select "title", "Contact | #{@base_title}"
|
|
end
|
|
end
|
|
|