Skip to content

Commit

Permalink
Add SMS POST route.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeck committed Aug 4, 2014
1 parent 1334888 commit 94f5cf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/blacklight/routes.rb
Expand Up @@ -102,6 +102,7 @@ def export(primary_resource)
get "#{primary_resource}/email", :as => "email_#{primary_resource}"
post "#{primary_resource}/email"
get "#{primary_resource}/sms", :as => "sms_#{primary_resource}"
post "#{primary_resource}/sms"
end
end

Expand Down
5 changes: 4 additions & 1 deletion spec/routing/catalog_routing_spec.rb
Expand Up @@ -9,9 +9,12 @@
it "should have a path for sending the email" do
expect(:post => "/catalog/email").to route_to(:controller => 'catalog', :action => 'email')
end
it "should map {:controller => 'catalog', :action => 'sms'} to /catalog/sms" do
it "should map GET {:controller => 'catalog', :action => 'sms'} to /catalog/sms" do
expect(:get => "/catalog/sms").to route_to(:controller => 'catalog', :action => 'sms')
end
it "should map POST {:controller => 'catalog', :action => 'sms'} to /catalog/sms" do
expect(:post => "/catalog/sms").to route_to(:controller => 'catalog', :action => 'sms')
end
it "should map { :controller => 'catalog', :action => 'show', :id => 666 } to /catalog/666" do
expect(:get => "/catalog/666").to route_to(:controller => 'catalog', :action => 'show', :id => "666")
end
Expand Down

0 comments on commit 94f5cf5

Please sign in to comment.