Skip to content

Commit

Permalink
Fix escaped quotes and product name in admin product edit header
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung Lê committed Jan 18, 2012
1 parent e68d278 commit 18ad5c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/app/views/spree/admin/shared/_product_tabs.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><%== t(:editing_product) + " &ldquo;#{@product.name}&rdquo;" %></h1>
<h1><%= t(:editing_product) %> &ldquo;<%= @product.name %>&rdquo;</h1>

<% content_for :sidebar do %>

Expand Down
10 changes: 5 additions & 5 deletions core/spec/requests/admin/products/edit/products_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
describe 'Product Details' do
context 'editing a product' do
it 'should list the product details' do
Factory(:product, :name => 'apache baseball cap', :description => 'lorem ipsum',
:sku => 'A100', :available_on => '2011-01-01 01:01:01', :count_on_hand => 10)
Factory(:product, :name => 'Bún thịt nướng', :permalink => 'bun-thit-nuong', :sku => 'A100',
:description => 'lorem ipsum', :available_on => '2011-01-01 01:01:01', :count_on_hand => 10)

sign_in_as!(Factory(:admin_user))
visit spree.admin_path
Expand All @@ -14,9 +14,9 @@
click_link 'Product Details'

within('#content') do
find('h1').text.should == 'Editing Product “apache baseball cap”'
find('input#product_name').value.should == 'apache baseball cap'
find('input#product_permalink').value.should == 'apache-baseball-cap'
find('h1').text.should == 'Editing Product “Bún thịt nướng”'
find('input#product_name').value.should == 'Bún thịt nướng'
find('input#product_permalink').value.should == 'bun-thit-nuong'
find('textarea#product_description').text.should == 'lorem ipsum'
find('input#product_price').value.should == '19.99'
find('input#product_cost_price').value.should == '17.00'
Expand Down

0 comments on commit 18ad5c7

Please sign in to comment.