require "rails_helper"

RSpec.describe Loa::TiposDeDeducaoController, type: :routing do
  describe "routing" do

    it "roteia para #index" do
      expect(:get => "/loa/2017/tipos_de_deducao").to route_to("loa/tipos_de_deducao#index", exercicio: "2017")
    end

    it "roteia para #new" do
      expect(:get => "/loa/2017/tipos_de_deducao/new").to route_to("loa/tipos_de_deducao#new", exercicio: "2017")
    end

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

    it "roteia para #create" do
      expect(:post => "/loa/2017/tipos_de_deducao").to route_to("loa/tipos_de_deducao#create", exercicio: "2017")
    end

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

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

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

  end
end
