./bin/rails importmap:install

This commit is contained in:
Ryan W
2021-09-26 15:22:36 -07:00
parent 536a7d88cb
commit bea88d4d33
31 changed files with 484 additions and 19 deletions
+38
View File
@@ -0,0 +1,38 @@
require "rails_helper"
RSpec.describe ArticlesController, type: :routing do
describe "routing" do
it "routes to #index" do
expect(get: "/articles").to route_to("articles#index")
end
it "routes to #new" do
expect(get: "/articles/new").to route_to("articles#new")
end
it "routes to #show" do
expect(get: "/articles/1").to route_to("articles#show", id: "1")
end
it "routes to #edit" do
expect(get: "/articles/1/edit").to route_to("articles#edit", id: "1")
end
it "routes to #create" do
expect(post: "/articles").to route_to("articles#create")
end
it "routes to #update via PUT" do
expect(put: "/articles/1").to route_to("articles#update", id: "1")
end
it "routes to #update via PATCH" do
expect(patch: "/articles/1").to route_to("articles#update", id: "1")
end
it "routes to #destroy" do
expect(delete: "/articles/1").to route_to("articles#destroy", id: "1")
end
end
end