Sha256: 878b930f5785e1cbfb4978bb5e9bf75380f382ae20fae7710450caa708fd8041

Contents?: true

Size: 1.14 KB

Versions: 7

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

describe "Routes for batch_update" do
  it "should route index" do 
    { :get => '/batch_edits' }.should route_to( :controller => "batch_edits", :action => "index")
  end
  it "should route edit" do 
    { :get => edit_batch_edits_path }.should route_to( :controller => "batch_edits", :action => "edit")
  end
  it "should route update" do 
    { :put => batch_edits_path }.should route_to( :controller => "batch_edits", :action => "update")
  end
  it "should route delete batch" do 
    { :delete => batch_edits_path }.should route_to( :controller => "batch_edits", :action => "destroy_collection")
  end
  it "should route add" do 
    { :put => '/batch_edits/7'}.should route_to( :controller => "batch_edits", :action => "add", :id=>'7')
  end
  it "should route delete" do 
    { :delete => '/batch_edits/7' }.should route_to( :controller => "batch_edits", :action => "destroy", :id=>'7')
    batch_edit_path(7).should == "/batch_edits/7"
  end

  it "should route all" do 
    { :put => '/batch_edits/all'}.should route_to( :controller => "batch_edits", :action => "all")
    all_batch_edits_path.should == "/batch_edits/all"
  end


end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hydra-batch-edit-1.0.1 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-1.0.0 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.3.1 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.3.0 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.2.0 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.1.0 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.0.7 spec/routing/batch_edit_routes_spec.rb