require "rails_helper"

RSpec.describe Ppa::SubAreasTematicasController, type: :routing do
	describe "routing" do
		it "roteia para #new" do
			expect(:get => "/ppa/areas_tematicas/1/sub_areas_tematicas/new").to route_to("ppa/sub_areas_tematicas#new", :area_tematica_id => "1")
		end

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

		it "roteia para #create" do
			expect(:post => "/ppa/areas_tematicas/1/sub_areas_tematicas").to route_to("ppa/sub_areas_tematicas#create", :area_tematica_id => "1")
		end

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

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

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

	end
end
