Commit de63577
Changed files (2)
config
spec
routing
config/routes.rb
@@ -1,5 +1,5 @@
Mocode::Application.routes.draw do
- get 'logins/new', to: 'logins#new'
+ resources :logins, only: [:new, :create]
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
spec/routing/logins_routing_spec.rb
@@ -4,4 +4,8 @@ describe '/logins' do
it "routes to logins#new" do
expect(get: 'logins/new').to route_to(controller: 'logins', action: 'new')
end
+
+ it "routes to logins#create" do
+ expect(post: 'logins').to route_to(controller: 'logins', action: 'create')
+ end
end