Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDennis Schubert <mail@dennis-schubert.de>2020-02-04 16:38:49 +0300
committerDennis Schubert <mail@dennis-schubert.de>2020-02-04 17:52:57 +0300
commitdbbf7439200de62ffa5ed6131c1b8d7fe7a3d98a (patch)
treecd842cb5805cbd2fa1ceb821bf706a2dedcf8aa0 /spec
parentbf55d07580d41532416e77f4be54300f3a5ee1a8 (diff)
Add the scaled_full image as a raw image in AvatarPresenter as well.
This is a temporary workaround. Adding the real raw photo is quite a challange and touches multiple components nobody wants to touch right now. As this change is blocking an actual hotfix, this is fine, and will be properly fixed at a later time.
Diffstat (limited to 'spec')
-rw-r--r--spec/presenters/avatar_presenter_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/presenters/avatar_presenter_spec.rb b/spec/presenters/avatar_presenter_spec.rb
index d85d43a47..a2269b9bc 100644
--- a/spec/presenters/avatar_presenter_spec.rb
+++ b/spec/presenters/avatar_presenter_spec.rb
@@ -5,7 +5,7 @@ describe AvatarPresenter do
it "calls image_url() for the avatars" do
profile = FactoryGirl.create(:profile_with_image_url, person: alice.person)
presenter = AvatarPresenter.new(profile)
- expect(profile).to receive(:image_url).exactly(3).times.and_call_original
+ expect(profile).to receive(:image_url).exactly(4).times.and_call_original
expect(presenter.base_hash).to be_present
end
@@ -14,5 +14,15 @@ describe AvatarPresenter do
presenter = AvatarPresenter.new(profile)
expect(presenter.base_hash).to be_nil
end
+
+ it "returns all relevant sizes" do
+ profile = FactoryGirl.create(:profile_with_image_url, person: alice.person)
+ base_hash = AvatarPresenter.new(profile).base_hash
+
+ expect(base_hash[:small]).to be_truthy
+ expect(base_hash[:medium]).to be_truthy
+ expect(base_hash[:large]).to be_truthy
+ expect(base_hash[:raw]).to be_truthy
+ end
end
end