Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec coverage for Admin::Trends::StatusesHelper #23898

Merged

Conversation

mjankowski
Copy link
Contributor

No description provided.

@mjankowski mjankowski force-pushed the helper-spec-admin-trends-statuses branch from aebc62e to dfe124b Compare February 27, 2023 19:20
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Thank you for your contribution, it's helpful overall but one of the test cases is redundant.

Comment on lines 41 to 52
context 'with a status that has emoji' do
let(:status) { Fabricate.build(:status, text: 'hello there :florpy:') }

it 'renders a correct preview text' do
result = helper.one_line_preview(status)

expect(result).to eq 'hello there :florpy:'
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the :florpy: custom emoji is never defined anywhere, that test does not really test anything different than “renders a correct preview text”. I'd suggest either removing it or defining a proper custom emoji.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch ... I feel like I had this in place and may have lost in a rebase. Will update and push changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a change which restores the creation of the florpy custom emoji.

@mjankowski mjankowski force-pushed the helper-spec-admin-trends-statuses branch from dfe124b to 5269572 Compare March 2, 2023 14:22
@ClearlyClaire ClearlyClaire merged commit 35dff48 into mastodon:main Mar 2, 2023
@mjankowski mjankowski deleted the helper-spec-admin-trends-statuses branch March 2, 2023 14:52
skerit pushed a commit to 11ways/mastodon that referenced this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants