Skip to content

Commit

Permalink
Refactor site controller tests to inherit from ActionDispatch::Integr…
Browse files Browse the repository at this point in the history
…ationTest

This is the modern way of writing controller tests, since it uses the
rails middleware (among other things) and leads to more realistic tests.

Refs openstreetmap#2563
  • Loading branch information
gravitystorm committed Apr 22, 2020
1 parent 5df4342 commit 1aa5a54
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 68 deletions.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
match "/auth/:provider" => "users#auth", :via => [:get, :post], :as => :auth

# permalink
get "/go/:code" => "site#permalink", :code => /[a-zA-Z0-9_@~]+[=-]*/
get "/go/:code" => "site#permalink", :code => /[a-zA-Z0-9_@~]+[=-]*/, :as => :permalink

# rich text preview
post "/preview/:type" => "site#preview", :as => :preview
Expand Down
Loading

0 comments on commit 1aa5a54

Please sign in to comment.