Sha256: eb77c0bb125e47d43c26ec50ae8ff4ad040501e29647459a8998b5bf6cffc3b8

Contents?: true

Size: 570 Bytes

Versions: 28

Compression:

Stored size: 570 Bytes

Contents

describe Riak do
  require 'riak/core_ext/to_param'

  it "should do param conversion correctly" do
    { :name => 'David', :nationality => 'Danish' }.to_param.should == "name=David&nationality=Danish"
  end

  # Based on the activesupport implementation.
  # https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/to_param.rb
  it "should do param conversion correctly with a namespace" do
    { :name => 'David', :nationality => 'Danish' }.to_param('user').should == "user%5Bname%5D=David&user%5Bnationality%5D=Danish"
  end

end

Version data entries

28 entries across 18 versions & 2 rubygems

Version Path
riak-client-1.4.5 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.4.1 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.4 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.3 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.2 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.1 spec/riak/core_ext/to_param_spec.rb
riak-client-1.4.0 spec/riak/core_ext/to_param_spec.rb
riak-client-1.2.0 spec/riak/core_ext/to_param_spec.rb
riak-client-1.1.1 spec/riak/core_ext/to_param_spec.rb
riak-client-1.1.0 spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.5 spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/pkg/riak-client-1.0.0/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/pkg/riak-client-1.0.1/pkg/riak-client-1.0.0/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/pkg/riak-client-1.0.1/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.2/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.1/pkg/riak-client-1.0.0/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.0/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.3 pkg/riak-client-1.0.1/spec/riak/core_ext/to_param_spec.rb
riak-client-1.0.2 pkg/riak-client-1.0.0/spec/riak/core_ext/to_param_spec.rb