diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-17 14:52:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 14:52:26 +0200 |
commit | e0bdaeab657d9a320aaf506d98ca82d41e7bfdd5 (patch) | |
tree | b53a50b162b46b1e9179bf2e49299a452544d115 /spec/services/fetch_remote_status_service_spec.rb | |
parent | c78a622ba4bd7fce511e5f079dd6b8deb17f9cef (diff) |
Fix NoMethodError when resolving a link that redirects to a local post (#18314)
* Fix NoMethodError when resolving a link that redirects to a local post * Fix tests
Diffstat (limited to 'spec/services/fetch_remote_status_service_spec.rb')
-rw-r--r-- | spec/services/fetch_remote_status_service_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/services/fetch_remote_status_service_spec.rb b/spec/services/fetch_remote_status_service_spec.rb index 0e63cc9eb..fe5f1aed1 100644 --- a/spec/services/fetch_remote_status_service_spec.rb +++ b/spec/services/fetch_remote_status_service_spec.rb @@ -1,14 +1,13 @@ require 'rails_helper' RSpec.describe FetchRemoteStatusService, type: :service do - let(:account) { Fabricate(:account) } + let(:account) { Fabricate(:account, domain: 'example.org', uri: 'https://example.org/foo') } let(:prefetched_body) { nil } - let(:valid_domain) { Rails.configuration.x.local_domain } let(:note) do { '@context': 'https://www.w3.org/ns/activitystreams', - id: "https://#{valid_domain}/@foo/1234", + id: "https://example.org/@foo/1234", type: 'Note', content: 'Lorem ipsum', attributedTo: ActivityPub::TagManager.instance.uri_for(account), @@ -20,7 +19,6 @@ RSpec.describe FetchRemoteStatusService, type: :service do let(:prefetched_body) { Oj.dump(note) } before do - account.update(uri: ActivityPub::TagManager.instance.uri_for(account)) subject end |