Skip to content

Commit

Permalink
Correcting spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kmalick committed Oct 31, 2024
1 parent a635ab1 commit 5f2dd73
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions spec/routing/signed_up_teams_routing_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5f2dd73

Please sign in to comment.