mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-10 07:50:33 -07:00
Extract legacy parts of the codebase into its own module
This commit is contained in:
parent
cf6e80ce6b
commit
413096dfe2
269 changed files with 5549 additions and 5279 deletions
|
|
@ -1,39 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe CategoriesController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/categories").to route_to("categories#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/categories/new").to route_to("categories#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/categories/1").to route_to("categories#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/categories/1/edit").to route_to("categories#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/categories").to route_to("categories#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/categories/1").to route_to("categories#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/categories/1").to route_to("categories#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/categories/1").to route_to("categories#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe DistrictsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/districts").to route_to("districts#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/districts/new").to route_to("districts#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/districts/1").to route_to("districts#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/districts/1/edit").to route_to("districts#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/districts").to route_to("districts#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/districts/1").to route_to("districts#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/districts/1").to route_to("districts#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/districts/1").to route_to("districts#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
41
spec/routing/legacy/categories_routing_spec.rb
Normal file
41
spec/routing/legacy/categories_routing_spec.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe CategoriesController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/categories").to route_to("legacy/categories#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/categories/new").to route_to("legacy/categories#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/categories/1").to route_to("legacy/categories#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/categories/1/edit").to route_to("legacy/categories#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/categories").to route_to("legacy/categories#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/categories/1").to route_to("legacy/categories#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/categories/1").to route_to("legacy/categories#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/categories/1").to route_to("legacy/categories#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
41
spec/routing/legacy/districts_routing_spec.rb
Normal file
41
spec/routing/legacy/districts_routing_spec.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe DistrictsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/districts").to route_to("legacy/districts#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/districts/new").to route_to("legacy/districts#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/districts/1").to route_to("legacy/districts#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/districts/1/edit").to route_to("legacy/districts#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/districts").to route_to("legacy/districts#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/districts/1").to route_to("legacy/districts#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/districts/1").to route_to("legacy/districts#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/districts/1").to route_to("legacy/districts#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
41
spec/routing/legacy/question_lists_routing_spec.rb
Normal file
41
spec/routing/legacy/question_lists_routing_spec.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe Legacy::QuestionListsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/question_lists").to route_to("legacy/question_lists#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/question_lists/new").to route_to("legacy/question_lists#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/question_lists/1").to route_to("legacy/question_lists#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/question_lists/1/edit").to route_to("legacy/question_lists#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/question_lists").to route_to("legacy/question_lists#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/question_lists/1").to route_to("legacy/question_lists#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/question_lists/1").to route_to("legacy/question_lists#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/question_lists/1").to route_to("legacy/question_lists#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
41
spec/routing/legacy/questions_routing_spec.rb
Normal file
41
spec/routing/legacy/questions_routing_spec.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe QuestionsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/questions").to route_to("legacy/questions#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/questions/new").to route_to("legacy/questions#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/questions/1").to route_to("legacy/questions#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/questions/1/edit").to route_to("legacy/questions#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/questions").to route_to("legacy/questions#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/questions/1").to route_to("legacy/questions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/questions/1").to route_to("legacy/questions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/questions/1").to route_to("legacy/questions#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
47
spec/routing/legacy/recipient_lists_routing_spec.rb
Normal file
47
spec/routing/legacy/recipient_lists_routing_spec.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe RecipientListsController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists").to route_to("legacy/recipient_lists#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/new").to route_to("legacy/recipient_lists#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/1").to route_to("legacy/recipient_lists#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/1/edit").to route_to("legacy/recipient_lists#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/recipient_lists").to route_to("legacy/recipient_lists#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/recipient_lists/1").to route_to("legacy/recipient_lists#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/recipient_lists/1").to route_to("legacy/recipient_lists#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/recipient_lists/1").to route_to("legacy/recipient_lists#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
47
spec/routing/legacy/recipients_routing_spec.rb
Normal file
47
spec/routing/legacy/recipients_routing_spec.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe RecipientsController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/recipients").to route_to("legacy/recipients#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/new").to route_to("legacy/recipients#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/1").to route_to("legacy/recipients#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/1/edit").to route_to("legacy/recipients#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/recipients").to route_to("legacy/recipients#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/recipients/1").to route_to("legacy/recipients#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/recipients/1").to route_to("legacy/recipients#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/recipients/1").to route_to("legacy/recipients#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
47
spec/routing/legacy/schedules_routing_spec.rb
Normal file
47
spec/routing/legacy/schedules_routing_spec.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe SchedulesController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/schedules").to route_to("legacy/schedules#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/new").to route_to("legacy/schedules#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/1").to route_to("legacy/schedules#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/1/edit").to route_to("legacy/schedules#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/schedules").to route_to("legacy/schedules#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/schedules/1").to route_to("legacy/schedules#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/schedules/1").to route_to("legacy/schedules#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/schedules/1").to route_to("legacy/schedules#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
41
spec/routing/legacy/schools_routing_spec.rb
Normal file
41
spec/routing/legacy/schools_routing_spec.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Legacy
|
||||
RSpec.describe SchoolsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/schools").to route_to("legacy/schools#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/schools/new").to route_to("legacy/schools#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/schools/1").to route_to("legacy/schools#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/schools/1/edit").to route_to("legacy/schools#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/schools").to route_to("legacy/schools#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/schools/1").to route_to("legacy/schools#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/schools/1").to route_to("legacy/schools#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/schools/1").to route_to("legacy/schools#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe QuestionListsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/question_lists").to route_to("question_lists#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/question_lists/new").to route_to("question_lists#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/question_lists/1").to route_to("question_lists#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/question_lists/1/edit").to route_to("question_lists#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/question_lists").to route_to("question_lists#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/question_lists/1").to route_to("question_lists#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/question_lists/1").to route_to("question_lists#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/question_lists/1").to route_to("question_lists#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe QuestionsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/questions").to route_to("questions#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/questions/new").to route_to("questions#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/questions/1").to route_to("questions#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/questions/1/edit").to route_to("questions#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/questions").to route_to("questions#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/questions/1").to route_to("questions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/questions/1").to route_to("questions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/questions/1").to route_to("questions#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe RecipientListsController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists").to route_to("recipient_lists#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/new").to route_to("recipient_lists#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/1").to route_to("recipient_lists#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/recipient_lists/1/edit").to route_to("recipient_lists#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/recipient_lists").to route_to("recipient_lists#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/recipient_lists/1").to route_to("recipient_lists#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/recipient_lists/1").to route_to("recipient_lists#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/recipient_lists/1").to route_to("recipient_lists#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe RecipientsController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/recipients").to route_to("recipients#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/new").to route_to("recipients#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/1").to route_to("recipients#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/recipients/1/edit").to route_to("recipients#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/recipients").to route_to("recipients#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/recipients/1").to route_to("recipients#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/recipients/1").to route_to("recipients#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/recipients/1").to route_to("recipients#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe SchedulesController, type: :routing do
|
||||
describe "routing" do
|
||||
before(:each) do
|
||||
@school = School.create!(
|
||||
:name => "MyString",
|
||||
:district_id => 1
|
||||
)
|
||||
end
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "schools/#{@school.id}/schedules").to route_to("schedules#index", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/new").to route_to("schedules#new", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/1").to route_to("schedules#show", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "schools/#{@school.id}/schedules/1/edit").to route_to("schedules#edit", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "schools/#{@school.id}/schedules").to route_to("schedules#create", school_id: @school.id.to_s)
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "schools/#{@school.id}/schedules/1").to route_to("schedules#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "schools/#{@school.id}/schedules/1").to route_to("schedules#update", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "schools/#{@school.id}/schedules/1").to route_to("schedules#destroy", school_id: @school.id.to_s, :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe SchoolsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/schools").to route_to("schools#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/schools/new").to route_to("schools#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/schools/1").to route_to("schools#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/schools/1/edit").to route_to("schools#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/schools").to route_to("schools#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/schools/1").to route_to("schools#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/schools/1").to route_to("schools#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/schools/1").to route_to("schools#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue