0
describe Inventory::Export do
  describe "export page" do
    it "check to show export page" do
      user = FactoryGirl.build(:admin) 
      activity_type = FactoryGirl.create(:activity_type) 
      visit "/users/sign_in"
      fill_in "user_Login", :with => user.Login
      fill_in "user_password", :with => user.password
      click_button "user_submit"
      visit "/admin/inventory/exports"
      save_and_open_page
    end
  end
end

代码在

visit "/admin/inventory/exports"

不影响结果

save_and_open_page

我得到授权后重定向的页面

4

1 回答 1

2

尝试

visit admin_inventory_exports_path

使用 .检查您的路线的实际路径rake routes

于 2012-08-26T02:38:47.160 回答