spec/dummy/spec/helpers/image_helper_spec.rb in poodle-rb-0.1.8 vs spec/dummy/spec/helpers/image_helper_spec.rb in poodle-rb-0.1.9
- old
+ new
@@ -27,12 +27,12 @@
expect(helper.image_url(user, "profile_picture.image.large.url")).to eq("http://placehold.it/60x60&text=<No Image>")
expect(helper.image_url(user, "profile_picture.image.thumb.url", width: 40, height: 10)).to eq("http://placehold.it/40x10&text=<No Image>")
end
it "should return careerwave url for user with profile picture" do
- expect(helper.image_url(user_with_image, "profile_picture.image.large.url")).to eq("/spec/dummy/uploads/image/profile_picture/1/large_test.jpg")
- expect(helper.image_url(user_with_image, "profile_picture.image.thumb.url")).to eq("/spec/dummy/uploads/image/profile_picture/1/thumb_test.jpg")
+ expect(helper.image_url(user_with_image, "profile_picture.image.large.url")).to eq("/public/uploads/image/profile_picture/1/large_test.jpg")
+ expect(helper.image_url(user_with_image, "profile_picture.image.thumb.url")).to eq("/public/uploads/image/profile_picture/1/thumb_test.jpg")
end
end
describe '#display_image' do
it "should return image tag with placeholder url for user without profile picture" do
@@ -54,10 +54,10 @@
describe '#display_user_image' do
it "should display placeholder image for user without image" do
exptected_result = content_tag(:div) do
content_tag(:div, class: "rounded", style: "width:60px;height:auto") do
- image_tag(placeholdit(), {style: "width:100%;height:auto;cursor:default;", class: "#{user.id}-poodle-thumb-image"})
+ image_tag(placeholdit(text: namify(user.name)), {style: "width:100%;height:auto;cursor:default;", class: "#{user.id}-poodle-thumb-image"})
end
end
expect(helper.display_user_image(user, "profile_picture.image.thumb.url")).to eq(exptected_result)
end
\ No newline at end of file