Adding promo image to about panel

This commit is contained in:
Will Marshall
2014-01-21 16:56:00 +11:00
parent aec5894c70
commit 8879181a27
3 changed files with 12 additions and 1 deletions

View File

@@ -65,6 +65,10 @@ shop
& > .content
background: none
border: none
img
margin: 0px 0px 0px 40px
p
max-width: 555px
& > .title, &.active > .title
text-transform: uppercase
line-height: 50px

View File

@@ -14,10 +14,11 @@
%tabs
.row
.section-container.auto{"data-section" => "", "data-options" => "one_up: false"}
%section
%section#about
%p.title.avenir{"data-section-title" => ""}
%a{href: "#about"} About Us
.content{"data-section-content" => ""}
%img.about.right{src: @distributor.promo_image.url(:large)}
%p= @distributor.long_description.andand.html_safe
%section

View File

@@ -17,6 +17,12 @@ feature "As a consumer I want to shop with a distributor", js: true do
page.should have_text distributor.name
end
it "shows distributor images" do
visit shop_path
first("distributor img")['src'].should == distributor.logo.url(:thumb)
first("#about img")['src'].should == distributor.promo_image.url(:large)
end
describe "With products in order cycles" do
let(:supplier) { create(:supplier_enterprise) }
let(:product) { create(:product, supplier: supplier) }