about summary refs log tree commit diff
path: root/spec/lib
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-06-07 05:13:49 -0500
committerDavid Yip <yipdw@member.fsf.org>2018-06-07 05:13:49 -0500
commit8142bd2553e7819722fdfc401e06cb10eeddd230 (patch)
treed771e65a58d3c69ba1c08c3fc145f24b5b806274 /spec/lib
parentf8d50a40701f344ea7c2a0e5475bbcbc727ef930 (diff)
parent2304d52599bfd3a907931971a94b9b68f229ab0a (diff)
Merge remote-tracking branch 'tootsuite/master' into merge-upstream
  Conflicts:
 	app/models/status.rb

The conflict in the Status model was due to
https://github.com/tootsuite/mastodon/commit/5bf500338478f819a65d25636a0af61a482972d3.
It was resolved by accepting tootsuite's changes.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/status_finder_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/lib/status_finder_spec.rb b/spec/lib/status_finder_spec.rb
index 3ef086736..6b4ee434f 100644
--- a/spec/lib/status_finder_spec.rb
+++ b/spec/lib/status_finder_spec.rb
@@ -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)