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

Fix NSFW not toggling via Protection Panel #1928

Merged
merged 6 commits into from
Jul 9, 2023

Conversation

ildyria
Copy link
Member

@ildyria ildyria commented Jul 9, 2023

  • Step 1. Create breaking tests.
  • Step 2. Fix code.

:)

Failed asserting that an array has the subset Array &0 (
    'policy' => Array &1 (
        'is_nsfw' => true
    )
).
--- Expected
+++ Actual
@@ @@
   array (
     'is_public' => true,
     'is_link_required' => false,
-    'is_nsfw' => true,
+    'is_nsfw' => false,
     'grants_full_photo_access' => true,
     'grants_download' => true,
     'is_password_required' => false,

@ildyria ildyria requested a review from a team July 9, 2023 15:34
@ildyria ildyria self-assigned this Jul 9, 2023
@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label Jul 9, 2023
github-actions bot and others added 3 commits July 9, 2023 17:58
Co-authored-by: Benoît Viguier <ildyria@users.noreply.github.com>
Co-authored-by: github-actions[bot] <action@github.com>
@ildyria ildyria marked this pull request as ready for review July 9, 2023 16:23
@ildyria ildyria added the bug Something isn't working label Jul 9, 2023
@codecov
Copy link

codecov bot commented Jul 9, 2023

Codecov Report

Merging #1928 (7423fb8) into master (a52fd8e) will decrease coverage by 0.48%.
The diff coverage is 100.00%.

Additional details and impacted files

Copy link
Contributor

@d7415 d7415 left a comment

Choose a reason for hiding this comment

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

Untested. Looks reasonable.

@ildyria
Copy link
Member Author

ildyria commented Jul 9, 2023

Untested. Looks reasonable.

I literally wrote a test to exhibit the behaviour, made it break and tested after the fix. 😅

@ildyria ildyria merged commit ddc2f1e into master Jul 9, 2023
@ildyria ildyria deleted the fix-nsfw-not-toggling-via-panel branch July 9, 2023 20:57
@d7415
Copy link
Contributor

d7415 commented Jul 9, 2023

Untested. Looks reasonable.

I literally wrote a test to exhibit the behaviour, made it break and tested after the fix. sweat_smile

Well yes. But I didn't test it 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Review: easy Easy review expected: probably just need a quick to go through.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants