require "spec_helper"

describe SupplierController, type: :routing do
  describe "routing" do

    it "routes root to #home" do
      get("/supplier").should route_to("supplier#home")
    end
    it "routes to #active_orders" do
      get("/supplier/active_orders").should route_to("supplier#active_orders")
    end
    it "routes to #active_lists" do
      get("/supplier/active_lists").should route_to("supplier#active_lists")
    end
    it "routes to #close_list" do
      post("/supplier/close_list").should route_to("supplier#close_list")
    end
    it "routes to #mark_list_as_helped" do
      post("/supplier/mark_list_as_helped").should route_to("supplier#mark_list_as_helped")
    end
    it "routes to #mark_order_in_process" do
      post("/supplier/mark_order_in_process").should route_to("supplier#mark_order_in_process")
    end
    it "routes to #order_is_delivered" do
      post("/supplier/order_is_delivered").should route_to("supplier#order_is_delivered")
    end
    it "routes to #mark_as_open" do
      post("/supplier/mark_as_open").should route_to("supplier#mark_as_open")
    end
    it "routes to #mark_as_closed" do
      post("/supplier/mark_as_closed").should route_to("supplier#mark_as_closed")
    end
    it "routes to #settings" do
      get("/supplier/settings").should route_to("supplier#edit")
    end
    it "routes to #update via put" do
      put("/supplier/settings").should route_to("supplier#update")
    end
    it "routes to #update via post" do
      post("/supplier/settings").should route_to("supplier#update")
    end
  end
end
