Fix tests for converted object types test:

- newlines don't have to be escaped
- prefer single quotes strings
- fix missing space after colon
This commit is contained in:
André Menrath 2024-01-09 16:27:58 +01:00
parent 71e1913e55
commit a7dc739efd
1 changed files with 7 additions and 7 deletions

View File

@ -72,7 +72,7 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
expect(status).to_not be_nil
expect(status.url).to eq 'https://foo.bar/watch?v=12345'
expect(strip_tags(status.text)).to eq 'Nyan Cat 10 hours remix\n\nhttps://foo.bar/watch?v=12345'
expect(strip_tags(status.text)).to eq "Nyan Cat 10 hours remix\n\nhttps://foo.bar/watch?v=12345"
end
end
@ -105,7 +105,7 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
expect(status).to_not be_nil
expect(status.url).to eq 'https://foo.bar/watch?v=12345'
expect(strip_tags(status.text)).to eq 'Nyan Cat 10 hours remix\n\nhttps://foo.bar/watch?v=12345'
expect(strip_tags(status.text)).to eq "Nyan Cat 10 hours remix\n\nhttps://foo.bar/watch?v=12345"
end
end
@ -125,7 +125,7 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
expect(status).to_not be_nil
expect(status.url).to eq 'https://foo.bar/@foo/1234'
expect(strip_tags(status.text)).to eq 'Let\'s change the world\n\nhttps://foo.bar/@foo/1234'
expect(strip_tags(status.text)).to eq "Let's change the world\n\nhttps://foo.bar/@foo/1234"
end
end
@ -138,11 +138,11 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
name: "Let's change the world",
startTime: '2024-01-31T20:00:00.000+01:00',
location: {
type:'Place',
type: 'Place',
name: 'FooBar',
},
content: "Some description of the event object that does not get converted.",
summary: "We meet on January 31st at 8pm in the FooBaar!",
content: 'Some description of the event object that does not get converted.',
summary: 'We meet on January 31st at 8pm in the FooBaar!',
attributedTo: ActivityPub::TagManager.instance.uri_for(sender),
}
end
@ -152,7 +152,7 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
expect(status).to_not be_nil
expect(status.url).to eq 'https://foo.bar/@foo/1234'
expect(strip_tags(status.text)).to eq 'Let\'s change the world\n\nWe meet on January 31st at 8pm in the FooBaar!\n\nhttps://foo.bar/@foo/1234'
expect(strip_tags(status.text)).to eq "Let's change the world\n\nWe meet on January 31st at 8pm in the FooBaar!\n\nhttps://foo.bar/@foo/1234"
end
end