require "rails_helper"

RSpec.describe FolgasController, type: :routing do
  describe "routing" do

    it "roteia para #index" do
      expect(:get => "/folgas").to route_to("folgas#index")
    end

    it "roteia para #new" do
      expect(:get => "/folgas/new").to route_to("folgas#new")
    end

    it "roteia para #edit" do
      expect(:get => "/folgas/1/edit").to route_to("folgas#edit", :id => "1")
    end

    it "roteia para #create" do
      expect(:post => "/folgas").to route_to("folgas#create")
    end

    it "roteia para #update via PUT" do
      expect(:put => "/folgas/1").to route_to("folgas#update", :id => "1")
    end

    it "roteia para #update via PATCH" do
      expect(:patch => "/folgas/1").to route_to("folgas#update", :id => "1")
    end

    it "roteia para #destroy" do
      expect(:delete => "/folgas/1").to route_to("folgas#destroy", :id => "1")
    end

  end
end
