Commit de63577

mo khan <mo@mokhan.ca>
2014-03-30 22:20:30
add routing spec to logins#create.
1 parent f1be468
Changed files (2)
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