Specs are green

This commit is contained in:
2014-12-11 16:08:30 +01:00
parent 15e6bdf054
commit f9c94bab47
6 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ gem 'slim-rails'
# Gems used only for assets and not required
# in production environments by default.
gem 'active_model_serializers' # explicitly outside assets
gem 'active_model_serializers', '0.9.0' # explicitly outside assets
group :assets do
gem 'jquery-rails'
gem 'jquery-ui-rails'
+2 -2
View File
@@ -79,7 +79,7 @@ GEM
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
active_decorator (0.3.4)
active_model_serializers (0.9.1)
active_model_serializers (0.9.0)
activemodel (>= 3.2)
activejob (4.2.0.rc2)
activesupport (= 4.2.0.rc2)
@@ -428,7 +428,7 @@ PLATFORMS
DEPENDENCIES
active_decorator
active_model_serializers
active_model_serializers (= 0.9.0)
bootstrap-sass (~> 2.3)
bourbon
capistrano (~> 3.0)
@@ -8,7 +8,11 @@ App.User = DS.Model.extend
facebook_image_tag: (->
facebook_id = @get('facebook_id')
return '' unless facebook_id
<% if Rails.env.test? %>
url = ""
<% else %>
url = "http://graph.facebook.com/#{facebook_id}/picture?type=square"
<% end %>
name = @get('name')
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" class=\"user-facebook-image\">"
).property('facebook_id', 'name')
+1
View File
@@ -6,6 +6,7 @@ step "there is an open supplier with a menu" do
@apple_pie= create :product, name: 'Apple pie', supplier: @supplier, price: 4.28, product_category_id: @category_lunch.id
@heineken_beer = create :product, name: 'Heineken beer', supplier: @supplier, price: 2.34, product_category_id: @category_beer.id
@product = @heineken_beer # set @product for user order selection
end
step "the supplier is in :time_zone" do |time_zone|
@@ -3,7 +3,7 @@ step "the user is on the active list page" do
end
step "the user should see the order in the active list view" do
page.evaluate_script(%|$('.order-row-#{@order.id}').text()|).first(14).should == '2 x Beer€ 4.68'
page.evaluate_script(%|$('.order-row-#{@order.id}').text()|).should start_with "2 x Heineken beer€ 4.68"
end
step "the user should not see the order in the active list view" do
@@ -17,7 +17,6 @@ step "the user clicks on the about link in the side menu" do
end
step "the user clicks on the active list link in the side menu" do
binding.pry
page.execute_script %|$('.side-menu-active-list').click()|
end