mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #23237 from gsamokovarov/new-welcome-page
Introduce new welcome page for new projects
This commit is contained in:
commit
f3c1897d30
4 changed files with 56 additions and 259 deletions
Binary file not shown.
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 1 MiB |
File diff suppressed because one or more lines are too long
|
@ -42,8 +42,7 @@ module ApplicationTests
|
||||||
test "root takes precedence over internal welcome controller" do
|
test "root takes precedence over internal welcome controller" do
|
||||||
app("development")
|
app("development")
|
||||||
|
|
||||||
get '/'
|
assert_welcome get('/')
|
||||||
assert_match %r{<h1>Getting started</h1>} , last_response.body
|
|
||||||
|
|
||||||
controller :foo, <<-RUBY
|
controller :foo, <<-RUBY
|
||||||
class FooController < ApplicationController
|
class FooController < ApplicationController
|
||||||
|
|
|
@ -74,10 +74,12 @@ module TestHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_welcome(resp)
|
def assert_welcome(resp)
|
||||||
|
resp = Array(resp)
|
||||||
|
|
||||||
assert_equal 200, resp[0]
|
assert_equal 200, resp[0]
|
||||||
assert_match 'text/html', resp[1]["Content-Type"]
|
assert_match 'text/html', resp[1]["Content-Type"]
|
||||||
assert_match 'charset=utf-8', 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
|
end
|
||||||
|
|
||||||
def assert_success(resp)
|
def assert_success(resp)
|
||||||
|
|
Loading…
Reference in a new issue