Merge remote-tracking branch 'glitchsoc/master' into 454-allow-keyword-mutes-to-skip-mentions

Conflicts:
 	app/models/glitch/keyword_mute.rb
This commit is contained in:
David Yip
2018-06-12 16:39:30 -05:00
100 changed files with 477 additions and 486 deletions

View File

@ -6,10 +6,11 @@ describe StatusFinder do
include RoutingHelper
describe '#status' do
subject { described_class.new(url) }
context 'with a status url' do
let(:status) { Fabricate(:status) }
let(:url) { short_account_status_url(account_username: status.account.username, id: status.id) }
subject { described_class.new(url) }
it 'finds the stream entry' do
expect(subject.status).to eq(status)
@ -27,7 +28,6 @@ describe StatusFinder do
context 'with a stream entry url' do
let(:stream_entry) { Fabricate(:stream_entry) }
let(:url) { account_stream_entry_url(stream_entry.account, stream_entry) }
subject { described_class.new(url) }
it 'finds the stream entry' do
expect(subject.status).to eq(stream_entry.status)
@ -37,7 +37,6 @@ describe StatusFinder do
context 'with a remote url even if id exists on local' do
let(:status) { Fabricate(:status) }
let(:url) { "https://example.com/users/test/statuses/#{status.id}" }
subject { described_class.new(url) }
it 'raises an error' do
expect { subject.status }.to raise_error(ActiveRecord::RecordNotFound)
@ -46,7 +45,6 @@ describe StatusFinder do
context 'with a plausible url' do
let(:url) { 'https://example.com/users/test/updates/123/embed' }
subject { described_class.new(url) }
it 'raises an error' do
expect { subject.status }.to raise_error(ActiveRecord::RecordNotFound)
@ -55,7 +53,6 @@ describe StatusFinder do
context 'with an unrecognized url' do
let(:url) { 'https://example.com/about' }
subject { described_class.new(url) }
it 'raises an error' do
expect { subject.status }.to raise_error(ActiveRecord::RecordNotFound)