Sha256: 34ebe00bc8d030e2d6436affe54ce38d04c7bfbda3c56f68064d9d851c5286bb

Contents?: true

Size: 426 Bytes

Versions: 9

Compression:

Stored size: 426 Bytes

Contents

require 'spec_helper'

module MobilePagination
  describe 'Utils' do
    include Utils

    it '#query_to_hash should covert query to hash' do
      expectation = query_to_hash('a=1&b=2')
      expect(expectation).to eq({'a' => '1', 'b' => '2'})
    end

    it '#hash_to_query should covert hash to query' do
      expectation = hash_to_query({ :a => 1, :b => 2})
      expect(expectation).to eq('a=1&b=2')
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mobile_pagination-0.0.9 spec/unit/utils_spec.rb
mobile_pagination-0.0.8 spec/unit/utils_spec.rb
mobile_pagination-0.0.7 spec/unit/utils_spec.rb
mobile_pagination-0.0.6 spec/unit/utils_spec.rb
mobile_pagination-0.0.5 spec/unit/utils_spec.rb
mobile_pagination-0.0.4 spec/unit/utils_spec.rb
mobile_pagination-0.0.3 spec/unit/utils_spec.rb
mobile_pagination-0.0.2 spec/unit/utils_spec.rb
mobile_pagination-0.0.1 spec/unit/utils_spec.rb