.circleci
.github
app
bin
config
db
dist
lib
log
nanobox
public
spec
controllers
fabricators
features
fixtures
helpers
lib
mailers
models
policies
presenters
requests
routing
services
support
examples
lib
models
concerns
account_avatar.rb
matchers
validators
views
workers
rails_helper.rb
spec_helper.rb
streaming
vendor
.buildpacks
.codeclimate.yml
.dockerignore
.editorconfig
.env.nanobox
.env.production.sample
.env.test
.env.vagrant
.eslintignore
.eslintrc.yml
.foreman
.gitattributes
.gitignore
.haml-lint.yml
.nanoignore
.nvmrc
.postcssrc.yml
.profile
.rspec
.rubocop.yml
.ruby-version
.scss-lint.yml
.slugignore
.yarnclean
AUTHORS.md
Aptfile
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Capfile
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Procfile
Procfile.dev
README.md
Rakefile
Vagrantfile
app.json
babel.config.js
boxfile.yml
config.ru
docker-compose.yml
jest.config.js
package.json
priv-config
scalingo.json
yarn.lock
* Introduce domains method to Account relation Account had followers_domains method, which was excessively specific. Let relation of Account have domains method instead. * Move follow_mapping in Account to AccountInteractions * Introduce shared examples for AccountAvatar inclusion * Cover Account more
20 lines
629 B
Ruby
20 lines
629 B
Ruby
# frozen_string_literal: true
|
|
|
|
shared_examples 'AccountAvatar' do |fabricator|
|
|
describe 'static avatars' do
|
|
describe 'when GIF' do
|
|
it 'creates a png static style' do
|
|
account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif'))
|
|
expect(account.avatar_static_url).to_not eq account.avatar_original_url
|
|
end
|
|
end
|
|
|
|
describe 'when non-GIF' do
|
|
it 'does not create extra static style' do
|
|
account = Fabricate(fabricator, avatar: attachment_fixture('attachment.jpg'))
|
|
expect(account.avatar_static_url).to eq account.avatar_original_url
|
|
end
|
|
end
|
|
end
|
|
end
|