Merge commit 'dee744c793
' into kbtopic-remove-quote
This commit is contained in:
commit
a88d202c6b
146 changed files with 1092 additions and 385 deletions
|
@ -1691,8 +1691,7 @@ RSpec.describe ActivityPub::Activity::Create do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
|
|
@ -26,8 +26,13 @@ RSpec.describe 'Home', :inline_jobs do
|
|||
before do
|
||||
user.account.follow!(bob)
|
||||
user.account.follow!(ana)
|
||||
PostStatusService.new.call(bob, text: 'New toot from bob.')
|
||||
quoted = PostStatusService.new.call(bob, text: 'New toot from bob.')
|
||||
PostStatusService.new.call(tim, text: 'New toot from tim.')
|
||||
reblogged = PostStatusService.new.call(tim, text: 'New toot from tim, which will end up boosted.')
|
||||
ReblogService.new.call(bob, reblogged)
|
||||
# TODO: use PostStatusService argument when available rather than manually creating quote
|
||||
quoting = PostStatusService.new.call(bob, text: 'Self-quote from bob.')
|
||||
Quote.create!(status: quoting, quoted_status: quoted, state: :accepted)
|
||||
PostStatusService.new.call(ana, text: 'New toot from ana.')
|
||||
end
|
||||
|
||||
|
|
|
@ -788,8 +788,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
@ -888,8 +887,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
@ -1040,8 +1038,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
@ -1111,8 +1108,7 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
|
|
@ -50,8 +50,7 @@ RSpec.describe ActivityPub::VerifyQuoteService do
|
|||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
toot: 'http://joinmastodon.org/ns#',
|
||||
QuoteAuthorization: 'toot:QuoteAuthorization',
|
||||
QuoteAuthorization: 'https://w3id.org/fep/044f#QuoteAuthorization',
|
||||
gts: 'https://gotosocial.org/ns#',
|
||||
interactionPolicy: {
|
||||
'@id': 'gts:interactionPolicy',
|
||||
|
|
|
@ -14,13 +14,11 @@ RSpec.describe BulkImportWorker do
|
|||
allow(BulkImportService).to receive(:new).and_return(service_double)
|
||||
end
|
||||
|
||||
it 'changes the import\'s state as appropriate' do
|
||||
expect { subject.perform(import.id) }.to change { import.reload.state.to_sym }.from(:scheduled).to(:in_progress)
|
||||
end
|
||||
|
||||
it 'calls BulkImportService' do
|
||||
subject.perform(import.id)
|
||||
expect(service_double).to have_received(:call).with(import)
|
||||
it 'calls the service and changes the import state' do
|
||||
expect { subject.perform(import.id) }
|
||||
.to change { import.reload.state.to_sym }.from(:scheduled).to(:in_progress)
|
||||
expect(service_double)
|
||||
.to have_received(:call).with(import)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue