correct letter avatar template

This commit is contained in:
Sam Saffron 2015-04-20 13:07:12 +10:00
parent 6d2e651862
commit 296add56e6
2 changed files with 3 additions and 3 deletions

View File

@ -417,7 +417,7 @@ class User < ActiveRecord::Base
end
def self.letter_avatar_template(username)
"/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar::VERSION}.png"
"/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png"
end
def avatar_template

View File

@ -860,7 +860,7 @@ describe User do
let(:user) { build(:user, username: 'Sam') }
it "returns a 45-pixel-wide avatar" do
expect(user.small_avatar_url).to eq("//test.localhost/letter_avatar/sam/45/#{LetterAvatar::VERSION}.png")
expect(user.small_avatar_url).to eq("//test.localhost/letter_avatar/sam/45/#{LetterAvatar.version}.png")
end
end
@ -1037,7 +1037,7 @@ describe User do
u = User.create!(username: "bob", email: "bob@bob.com")
u.reload
expect(u.uploaded_avatar_id).to eq(nil)
expect(u.avatar_template).to eq("/letter_avatar/bob/{size}/#{LetterAvatar::VERSION}.png")
expect(u.avatar_template).to eq("/letter_avatar/bob/{size}/#{LetterAvatar.version}.png")
end
end