Sha256: be6cb216011ecdbdb44006c8cd35b56ec2c076774a250cd77d0f24be34fb5d3a

Contents?: true

Size: 1009 Bytes

Versions: 2

Compression:

Stored size: 1009 Bytes

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 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

2 entries across 2 versions & 1 rubygems

Version Path
hydra-batch-edit-0.0.6 spec/routing/batch_edit_routes_spec.rb
hydra-batch-edit-0.0.5 spec/routing/batch_edit_routes_spec.rb