Sha256: 27c0644c475e8da35fc9648375f5810fc8245131be35af09708964ed052fe393
Contents?: true
Size: 740 Bytes
Versions: 4
Compression:
Stored size: 740 Bytes
Contents
require 'spec_helper' require_relative './../../examples/search_query' describe SearchQuery do before do @search = SearchQuery.new @search.query = 'This is a random search query.' @saved_search = SearchQuery.from_xml("<searchquery><query>Search for something</query></searchquery>") end it 'should return the default value for all attributes where no value is set' do expect(@search.language).to eq('EN') @search.max_results == 20 end it 'should return the same object for the default value' do expect(@search.language.object_id).to eq(@search.language.object_id) end it 'should respect the defaults when loading from xml' do expect(@saved_search.language).to eq('EN') @saved_search.max_results == 20 end end
Version data entries
4 entries across 4 versions & 1 rubygems