Skip to content

Instantly share code, notes, and snippets.

item_subtype:
1seater: "1 Seater"
2seater: "2 Seater"
3seater: "3 Seater"
4seater: "4 Seater"
anchorage_buoy: "Anchorage Buoy"
boat_house: "Boat House"
cabin_boat: "Cabin Boat"
cabin_cruisers_boats: "Cabin Cruisers Boats"
canoe: Canoe
def gplus_badge
link_to(
content_tag(:img, nil, { :src => 'https://ssl.gstatic.com/images/icons/gplus-16.png', :style => 'width:16px;height:16px;' }),
'https://plus.google.com/u/0/111138503591299012495/',
{
:target => '_blank',
:class => 'g-badge',
:style => 'text-decoration:none;'
}
)
this line is assert items.size > 10 is false
1) Failure:
test: Top adverts should be shown on first page. (ResultItemsControllerTest)
[test/integration/result_items_test.rb:175:in `__bind_1332923889_480750'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `call'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `test: Top adverts should be shown on first page. '
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `run'
2) Failure:
test: Top adverts should be shown on first page. (ResultItemsControllerTest)
[test/integration/result_items_test.rb:174:in `__bind_1332922428_513187'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `call'
shoulda-context (1.0.0) lib/shoulda/context/context.rb:398:in `test: Top adverts should be shown on first page. '
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `run'
activesupport (3.1.3) lib/active_support/callbacks.rb:408:in `_run_setup_callbacks'
activesupport (3.1.3) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.1.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
def show {
options = {
:item_type => @result_item.item_type,
:manufacturer => @result_item.manufacturer ,
:country_code => @result_item.country_code,
:model => @result_item.model,
:id =>@result_item.id,
}
Rails.logger.debug " ----#{result_item_url(options)}"
def show
def validate params
if !(self.manufacturer == params[:manufacturer] and self.country_code == params[:country_code] and self.model == params[:model])and params[search].nil?
Rails.logger.debug self.inspect
Rails.logger.debug params.inspect
raise Api::Errors::BadRequest.new 'Bad Request it should be like manufacturer-country_code-model'
end
end
1) Error:
test: The page should have translated item type in URLs for the alternate languages. (AlternateLanguagesTest):
NoMethodError: undefined method `pending' for #<AlternateLanguagesTest:0x7c76118>
actionpack (3.1.3) lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'
actionpack (3.1.3) lib/action_dispatch/testing/integration.rb:376:in `method_missing'
test/integration/alternate_languages_test.rb:49:in `__bind_1332341074_297892'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `call'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `test: The page should have translated item type in URLs for the alternate languages. '
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
activesupport (3.1.3) lib/active_support/testing/setup_and_teardown.rb:67:in `run'
EEEFEF
1) Error:
test: Make sure we have all the facet boxes needed for a certain search_type visible should item_types. (ResultItemsControllerTest):
NoMethodError: undefined method `pending' for #<ResultItemsControllerTest:0x7e23e38>
actionpack (3.1.3) lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'
actionpack (3.1.3) lib/action_dispatch/testing/integration.rb:376:in `method_missing'
test/integration/result_items_test.rb:199:in `__bind_1332339394_58788'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `call'
shoulda (2.11.3) lib/shoulda/context.rb:382:in `test: Make sure we have all the facet boxes needed for a certain search_type visible should item_types. '
def validate params
temp = self.manufacturer != params[:manufacturer]||self.country_code != params[:country_code] ||self.model != params[:model]
end
def validate params
true
end