This commit is contained in:
João Victor Geonizeli
2022-02-27 17:02:37 -03:00
parent 53c7d35d74
commit 1d692b31f8
13 changed files with 258 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
require "rails_helper"
RSpec.describe PostsController, type: :routing do
describe "routing" do
it "routes to #index" do
expect(get: "/posts").to route_to("posts#index")
end
it "routes to #show" do
expect(get: "/posts/1").to route_to("posts#show", id: "1")
end
it "routes to #create" do
expect(post: "/posts").to route_to("posts#create")
end
end
end