页面url就像/people?search=name
我使用current_path
的method,它只返回/people
。
current_path.should == people_path(:search => 'name')
但它没有说
expected: "/people?search=name"
got: "/people"
发布于 2018-03-23 14:49:33
我用_url替换了_path method,以便将完整的url与参数进行比较。
current_url.should == people_url(:search => 'name')
https://stackoverflow.com/questions/-100003672
复制相似问题