Sha256: 09ac3e4065986b9dff1cbb0f74cee5d5d8e73c80dd2188efa95d77849d8b7197
Contents?: true
Size: 1.85 KB
Versions: 15
Compression:
Stored size: 1.85 KB
Contents
require "rails_helper" #The register, login, and logout routes RSpec.describe "Users sign up process routing", :type => :routing do routes { People::Engine.routes } it "routes to register" do expect(:post => "/api/1/users/register").to route_to( :controller => "people/api/v1/users", :action => "register" ) end it "routes to login" do expect(:post => "/api/1/users/login").to route_to( :controller => "people/api/v1/users", :action => "login" ) end it "routes to logout" do expect(:get => "/api/1/users/logout").to route_to( :controller => "people/api/v1/users", :action => "logout" ) end end #The standard rest routes for the user controller RSpec.describe "Users controller rest routing", :type => :routing do routes { People::Engine.routes } it "routes to index" do expect(:get => "/api/1/users").to route_to( :controller => "people/api/v1/users", :action => "index" ) end it "routes to show" do expect(:get => "/api/1/users/1").to route_to( :controller => "people/api/v1/users", :action => "show", :id => "1" ) end it "routes to edit" do expect(:get => "/api/1/users/1/edit").to route_to( :controller => "people/api/v1/users", :action => "edit", :id => "1" ) end it "routes to create" do expect(:post => "/api/1/users/").to route_to( :controller => "people/api/v1/users", :action => "create" ) end it "routes to update" do expect(:put => "/api/1/users/1/").to route_to( :controller => "people/api/v1/users", :action => "update", :id => "1" ) end it "routes to update" do expect(:patch => "/api/1/users/1/").to route_to( :controller => "people/api/v1/users", :action => "update", :id => "1" ) end it "routes to delete" do expect(:delete => "/api/1/users/1/").to route_to( :controller => "people/api/v1/users", :action => "destroy", :id => "1" ) end end
Version data entries
15 entries across 10 versions & 1 rubygems