Introduce new welcome page for new projects
As requested by David in 23233.
This commit is contained in:
parent
6dfab475ca
commit
38492590cf
Binary file not shown.
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 1.0 MiB |
File diff suppressed because one or more lines are too long
@ -42,8 +42,7 @@ def teardown
|
||||
test "root takes precedence over internal welcome controller" do
|
||||
app("development")
|
||||
|
||||
get '/'
|
||||
assert_match %r{<h1>Getting started</h1>} , last_response.body
|
||||
assert_welcome get('/')
|
||||
|
||||
controller :foo, <<-RUBY
|
||||
class FooController < ApplicationController
|
||||
|
@ -74,10 +74,12 @@ def get(path)
|
||||
end
|
||||
|
||||
def assert_welcome(resp)
|
||||
resp = Array(resp)
|
||||
|
||||
assert_equal 200, resp[0]
|
||||
assert_match 'text/html', resp[1]["Content-Type"]
|
||||
assert_match 'charset=utf-8', resp[1]["Content-Type"]
|
||||
assert extract_body(resp).match(/Welcome aboard/)
|
||||
assert extract_body(resp).match(/Yay! You.*re on Rails!/)
|
||||
end
|
||||
|
||||
def assert_success(resp)
|
||||
|
Loading…
Reference in New Issue
Block a user