diaspora/spec/presenters/profile_presenter_spec.rb
2016-11-27 21:27:12 +01:00

11 lines
373 B
Ruby

describe ProfilePresenter do
let(:profile) { FactoryGirl.create(:profile_with_image_url, person: alice.person) }
describe "#for_hovercard" do
it "contains tags and avatar" do
hash = ProfilePresenter.new(profile).for_hovercard
expect(hash[:avatar]).to eq(profile.image_url_medium)
expect(hash[:tags]).to match_array(%w(one two))
end
end
end