diff --git a/spec/routing/courses_routing_spec.rb b/spec/routing/courses_routing_spec.rb index f8b0725d1..75dd7ba81 100644 --- a/spec/routing/courses_routing_spec.rb +++ b/spec/routing/courses_routing_spec.rb @@ -1,30 +1,29 @@ require "rails_helper" -RSpec.describe CoursesController, type: :routing do +RSpec.describe Api::V1::CoursesController, type: :routing do describe "routing" do it "routes to #index" do - expect(get: "/courses").to route_to("courses#index") + expect(get: "/api/v1/courses").to route_to("api/v1/courses#index") end it "routes to #show" do - expect(get: "/courses/1").to route_to("courses#show", id: "1") + expect(get: "/api/v1/courses/1").to route_to("api/v1/courses#show", id: "1") end - it "routes to #create" do - expect(post: "/courses").to route_to("courses#create") + expect(post: "/api/v1/courses").to route_to("api/v1/courses#create") end it "routes to #update via PUT" do - expect(put: "/courses/1").to route_to("courses#update", id: "1") + expect(put: "/api/v1/courses/1").to route_to("api/v1/courses#update", id: "1") end it "routes to #update via PATCH" do - expect(patch: "/courses/1").to route_to("courses#update", id: "1") + expect(patch: "/api/v1/courses/1").to route_to("api/v1/courses#update", id: "1") end it "routes to #destroy" do - expect(delete: "/courses/1").to route_to("courses#destroy", id: "1") + expect(delete: "/api/v1/courses/1").to route_to("api/v1/courses#destroy", id: "1") end end -end +end \ No newline at end of file diff --git a/spec/routing/join_team_requests_routing_spec.rb b/spec/routing/join_team_requests_routing_spec.rb index 01821c40f..6175eb20f 100644 --- a/spec/routing/join_team_requests_routing_spec.rb +++ b/spec/routing/join_team_requests_routing_spec.rb @@ -1,35 +1,29 @@ require "rails_helper" -RSpec.describe JoinTeamRequestsController, type: :routing do +RSpec.describe Api::V1::JoinTeamRequestsController, type: :routing do describe "routing" do - # Routes to the #index action it "routes to #index" do - expect(get: "/join_team_requests").to route_to("join_team_requests#index") + expect(get: "/api/v1/join_team_requests").to route_to("api/v1/join_team_requests#index") end - # Routes to the #show action with a specific ID it "routes to #show" do - expect(get: "/join_team_requests/1").to route_to("join_team_requests#show", id: "1") + expect(get: "/api/v1/join_team_requests/1").to route_to("api/v1/join_team_requests#show", id: "1") end - # Routes to the #create action it "routes to #create" do - expect(post: "/join_team_requests").to route_to("join_team_requests#create") + expect(post: "/api/v1/join_team_requests").to route_to("api/v1/join_team_requests#create") end - # Routes to the #update action via PUT it "routes to #update via PUT" do - expect(put: "/join_team_requests/1").to route_to("join_team_requests#update", id: "1") + expect(put: "/api/v1/join_team_requests/1").to route_to("api/v1/join_team_requests#update", id: "1") end - # Routes to the #update action via PATCH it "routes to #update via PATCH" do - expect(patch: "/join_team_requests/1").to route_to("join_team_requests#update", id: "1") + expect(patch: "/api/v1/join_team_requests/1").to route_to("api/v1/join_team_requests#update", id: "1") end - # Routes to the #destroy action it "routes to #destroy" do - expect(delete: "/join_team_requests/1").to route_to("join_team_requests#destroy", id: "1") + expect(delete: "/api/v1/join_team_requests/1").to route_to("api/v1/join_team_requests#destroy", id: "1") end end -end +end \ No newline at end of file diff --git a/spec/routing/sign_up_topics_routing_spec.rb b/spec/routing/sign_up_topics_routing_spec.rb index 5fbf3ed6b..bf7cfa236 100644 --- a/spec/routing/sign_up_topics_routing_spec.rb +++ b/spec/routing/sign_up_topics_routing_spec.rb @@ -1,30 +1,29 @@ require "rails_helper" -RSpec.describe SignUpTopicsController, type: :routing do +RSpec.describe Api::V1::SignUpTopicsController, type: :routing do describe "routing" do it "routes to #index" do - expect(get: "/sign_up_topics").to route_to("sign_up_topics#index") + expect(get: "/api/v1/sign_up_topics").to route_to("api/v1/sign_up_topics#index") end it "routes to #show" do - expect(get: "/sign_up_topics/1").to route_to("sign_up_topics#show", id: "1") + expect(get: "/api/v1/sign_up_topics/1").to route_to("api/v1/sign_up_topics#show", id: "1") end - it "routes to #create" do - expect(post: "/sign_up_topics").to route_to("sign_up_topics#create") + expect(post: "/api/v1/sign_up_topics").to route_to("api/v1/sign_up_topics#create") end it "routes to #update via PUT" do - expect(put: "/sign_up_topics/1").to route_to("sign_up_topics#update", id: "1") + expect(put: "/api/v1/sign_up_topics/1").to route_to("api/v1/sign_up_topics#update", id: "1") end it "routes to #update via PATCH" do - expect(patch: "/sign_up_topics/1").to route_to("sign_up_topics#update", id: "1") + expect(patch: "/api/v1/sign_up_topics/1").to route_to("api/v1/sign_up_topics#update", id: "1") end it "routes to #destroy" do - expect(delete: "/sign_up_topics/1").to route_to("sign_up_topics#destroy", id: "1") + expect(delete: "/api/v1/sign_up_topics/1").to route_to("api/v1/sign_up_topics#destroy", id: "1") end end -end +end \ No newline at end of file diff --git a/spec/routing/student_tasks_routing_spec.rb b/spec/routing/student_tasks_routing_spec.rb index 902e75db2..02f457e80 100644 --- a/spec/routing/student_tasks_routing_spec.rb +++ b/spec/routing/student_tasks_routing_spec.rb @@ -1,30 +1,29 @@ require "rails_helper" -RSpec.describe StudentTasksController, type: :routing do +RSpec.describe Api::V1::StudentTasksController, type: :routing do describe "routing" do it "routes to #index" do - expect(get: "/student_tasks").to route_to("student_tasks#index") + expect(get: "/api/v1/student_tasks").to route_to("api/v1/student_tasks#index") end it "routes to #show" do - expect(get: "/student_tasks/1").to route_to("student_tasks#show", id: "1") + expect(get: "/api/v1/student_tasks/1").to route_to("api/v1/student_tasks#show", id: "1") end - it "routes to #create" do - expect(post: "/student_tasks").to route_to("student_tasks#create") + expect(post: "/api/v1/student_tasks").to route_to("api/v1/student_tasks#create") end it "routes to #update via PUT" do - expect(put: "/student_tasks/1").to route_to("student_tasks#update", id: "1") + expect(put: "/api/v1/student_tasks/1").to route_to("api/v1/student_tasks#update", id: "1") end it "routes to #update via PATCH" do - expect(patch: "/student_tasks/1").to route_to("student_tasks#update", id: "1") + expect(patch: "/api/v1/student_tasks/1").to route_to("api/v1/student_tasks#update", id: "1") end it "routes to #destroy" do - expect(delete: "/student_tasks/1").to route_to("student_tasks#destroy", id: "1") + expect(delete: "/api/v1/student_tasks/1").to route_to("api/v1/student_tasks#destroy", id: "1") end end end