From 5f2dd73963812e7d9e97d8fcfb53ee90831a43a2 Mon Sep 17 00:00:00 2001 From: kmalick Date: Thu, 31 Oct 2024 19:28:57 -0400 Subject: [PATCH] Correcting spec --- spec/routing/signed_up_teams_routing_spec.rb | 31 ++++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/spec/routing/signed_up_teams_routing_spec.rb b/spec/routing/signed_up_teams_routing_spec.rb index 2a1b47dba..96f84f447 100644 --- a/spec/routing/signed_up_teams_routing_spec.rb +++ b/spec/routing/signed_up_teams_routing_spec.rb @@ -1,30 +1,29 @@ +# spec/routing/signed_up_teams_routing_spec.rb require "rails_helper" -RSpec.describe SignedUpTeamsController, type: :routing do +RSpec.describe Api::V1::SignedUpTeamsController, type: :routing do describe "routing" do it "routes to #index" do - expect(get: "/signed_up_teams").to route_to("signed_up_teams#index") + expect(get: "/api/v1/signed_up_teams").to route_to("api/v1/signed_up_teams#index") end it "routes to #show" do - expect(get: "/signed_up_teams/1").to route_to("signed_up_teams#show", id: "1") - end - - - it "routes to #create" do - expect(post: "/signed_up_teams").to route_to("signed_up_teams#create") + expect(get: "/api/v1/signed_up_teams/1").to route_to("api/v1/signed_up_teams#show", id: "1") end + end +end - it "routes to #update via PUT" do - expect(put: "/signed_up_teams/1").to route_to("signed_up_teams#update", id: "1") - end +# spec/routing/student_tasks_routing_spec.rb +require "rails_helper" - it "routes to #update via PATCH" do - expect(patch: "/signed_up_teams/1").to route_to("signed_up_teams#update", id: "1") +RSpec.describe Api::V1::StudentTasksController, type: :routing do + describe "routing" do + it "routes to #index" do + expect(get: "/api/v1/student_tasks").to route_to("api/v1/student_tasks#index") end - it "routes to #destroy" do - expect(delete: "/signed_up_teams/1").to route_to("signed_up_teams#destroy", id: "1") + it "routes to #show" do + expect(get: "/api/v1/student_tasks/1").to route_to("api/v1/student_tasks#show", id: "1") end end -end +end \ No newline at end of file