mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-23 16:44:04 -05:00
Fix RSpec/MetadataStyle
cop in spec/ (#27729)
This commit is contained in:
parent
e4e752c26e
commit
949f5eb860
@ -89,7 +89,7 @@ describe ApplicationHelper do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show_landing_strip?', without_verify_partial_doubles: true do
|
describe 'show_landing_strip?', :without_verify_partial_doubles do
|
||||||
describe 'when signed in' do
|
describe 'when signed in' do
|
||||||
before do
|
before do
|
||||||
allow(helper).to receive(:user_signed_in?).and_return(true)
|
allow(helper).to receive(:user_signed_in?).and_return(true)
|
||||||
|
@ -10,7 +10,7 @@ RSpec.describe FeedManager do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'tracks at least as many statuses as reblogs', skip_stub: true do
|
it 'tracks at least as many statuses as reblogs', :skip_stub do
|
||||||
expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS
|
expect(FeedManager::REBLOG_FALLOFF).to be <= FeedManager::MAX_ITEMS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe MediaAttachment, paperclip_processing: true do
|
RSpec.describe MediaAttachment, :paperclip_processing do
|
||||||
describe 'local?' do
|
describe 'local?' do
|
||||||
subject { media_attachment.local? }
|
subject { media_attachment.local? }
|
||||||
|
|
||||||
|
@ -127,19 +127,19 @@ RSpec.describe 'Media' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with image/jpeg', paperclip_processing: true do
|
context 'with image/jpeg', :paperclip_processing do
|
||||||
let(:params) { { file: fixture_file_upload('attachment.jpg', 'image/jpeg'), description: 'jpeg image' } }
|
let(:params) { { file: fixture_file_upload('attachment.jpg', 'image/jpeg'), description: 'jpeg image' } }
|
||||||
|
|
||||||
it_behaves_like 'a successful media upload', 'image'
|
it_behaves_like 'a successful media upload', 'image'
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with image/gif', paperclip_processing: true do
|
context 'with image/gif', :paperclip_processing do
|
||||||
let(:params) { { file: fixture_file_upload('attachment.gif', 'image/gif') } }
|
let(:params) { { file: fixture_file_upload('attachment.gif', 'image/gif') } }
|
||||||
|
|
||||||
it_behaves_like 'a successful media upload', 'image'
|
it_behaves_like 'a successful media upload', 'image'
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with video/webm', paperclip_processing: true do
|
context 'with video/webm', :paperclip_processing do
|
||||||
let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } }
|
let(:params) { { file: fixture_file_upload('attachment.webm', 'video/webm') } }
|
||||||
|
|
||||||
it_behaves_like 'a successful media upload', 'gifv'
|
it_behaves_like 'a successful media upload', 'gifv'
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe 'Media API', paperclip_processing: true do
|
RSpec.describe 'Media API', :paperclip_processing do
|
||||||
let(:user) { Fabricate(:user) }
|
let(:user) { Fabricate(:user) }
|
||||||
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
|
||||||
let(:scopes) { 'write' }
|
let(:scopes) { 'write' }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
shared_examples 'AccountAvatar' do |fabricator|
|
shared_examples 'AccountAvatar' do |fabricator|
|
||||||
describe 'static avatars', paperclip_processing: true do
|
describe 'static avatars', :paperclip_processing do
|
||||||
describe 'when GIF' do
|
describe 'when GIF' do
|
||||||
it 'creates a png static style' do
|
it 'creates a png static style' do
|
||||||
account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif'))
|
account = Fabricate(fabricator, avatar: attachment_fixture('avatar.gif'))
|
||||||
@ -17,7 +17,7 @@ shared_examples 'AccountAvatar' do |fabricator|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'base64-encoded files', paperclip_processing: true do
|
describe 'base64-encoded files', :paperclip_processing do
|
||||||
let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" }
|
let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" }
|
||||||
let(:account) { Fabricate(fabricator, avatar: base64_attachment) }
|
let(:account) { Fabricate(fabricator, avatar: base64_attachment) }
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
shared_examples 'AccountHeader' do |fabricator|
|
shared_examples 'AccountHeader' do |fabricator|
|
||||||
describe 'base64-encoded files', paperclip_processing: true do
|
describe 'base64-encoded files', :paperclip_processing do
|
||||||
let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" }
|
let(:base64_attachment) { "data:image/jpeg;base64,#{Base64.encode64(attachment_fixture('attachment.jpg').read)}" }
|
||||||
let(:account) { Fabricate(fabricator, header: base64_attachment) }
|
let(:account) { Fabricate(fabricator, header: base64_attachment) }
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
describe 'statuses/show.html.haml', without_verify_partial_doubles: true do
|
describe 'statuses/show.html.haml', :without_verify_partial_doubles do
|
||||||
before do
|
before do
|
||||||
allow(view).to receive_messages(api_oembed_url: '', show_landing_strip?: true, site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false)
|
allow(view).to receive_messages(api_oembed_url: '', show_landing_strip?: true, site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false)
|
||||||
allow(view).to receive(:local_time)
|
allow(view).to receive(:local_time)
|
||||||
|
Loading…
Reference in New Issue
Block a user