Skip to content
This repository has been archived by the owner on Aug 9, 2018. It is now read-only.

Commit

Permalink
Add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
koudaiii committed Mar 7, 2016
1 parent a201b3b commit ed0e9e8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/routing/hostname_constraints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,19 @@
action: 'new'
)
end

example 'ホスト名が対象外なら errors/not_foundへ' do
expect(get: 'http://foo.example.jp').to route_to(
controller: 'errors',
action: 'routing_error'
)
end

example '存在しないパスならerrors/not_foundへ' do
expect(get: 'http://baukis.example.com/xyz').to route_to(
controller: 'errors',
action: 'routing_error',
anything: 'xyz'
)
end
end

0 comments on commit ed0e9e8

Please sign in to comment.