Ruby on rails 小型测试路由测试htpp:200错误

Ruby on rails 小型测试路由测试htpp:200错误,ruby-on-rails,ruby,testing,minitest,Ruby On Rails,Ruby,Testing,Minitest,我使用minitest作为测试框架 **routes.rb file** Cultiva::Application.routes.draw do root :to => 'welcome#index' match "sign-up" => "identities#new", :as => :signup, method: :get match "sign-up" => redirect("auth/identity/register"), :as =>

我使用minitest作为测试框架

**routes.rb file**
Cultiva::Application.routes.draw do
  root :to => 'welcome#index'

  match "sign-up" => "identities#new", :as => :signup, method: :get
  match "sign-up" => redirect("auth/identity/register"), :as => :signup, method: :post
  match "sign-off" => "session#destroy", :as => :signoff
  resources :identities
路由文件如上所示。我为上面的get和post过程设置了注册页面路由。当它发布时,它重定向到“auth/identity/register”页面。我将页面的邮寄地址设置为“auth/identity/register”。我死记硬背下面的测试:

     it "must route to auth/identity/register when method is post" do
          post(signup_path).must_equal "/auth/identity/register"
      end


when i run this test, it gives error:

test_0002_must route to auth/identity/register when method is post(Route Integration Test::signup_path) [/home/developer/Projects/Bilsa/cultiva/test/routes/route_test.rb:13]:
Expected: "/auth/identity/register"
  Actual: 200