Skip to content

Add mock http calls to DiscordValidatorTests#523

Merged
Bpendragon merged 4 commits into
mainfrom
users/bpendragon/AddMockHttpValidators
Aug 3, 2021
Merged

Add mock http calls to DiscordValidatorTests#523
Bpendragon merged 4 commits into
mainfrom
users/bpendragon/AddMockHttpValidators

Conversation

@Bpendragon

Copy link
Copy Markdown
Contributor

Tests all return paths of the call.

@eddynaka

eddynaka commented Aug 2, 2021

Copy link
Copy Markdown
Collaborator
                    return ReturnUnexpectedResponseCode(ref message, response.StatusCode);

you can do something like:

ReturnUnexpectedResponseCode(ref message, response.StatusCode, account: id);

In reply to: 891391044


In reply to: 891391044


Refers to: Src/Plugins/Security/SEC101_046.DiscordApiCredentialsValidator.cs:115 in 484a0e8. [](commit_id = 484a0e8, deletion_comment = False)

@eddynaka

eddynaka commented Aug 2, 2021

Copy link
Copy Markdown
Collaborator
            return ReturnUnhandledException(ref message, e);

same here:

account: id

In reply to: 891391243


In reply to: 891391243


Refers to: Src/Plugins/Security/SEC101_046.DiscordApiCredentialsValidator.cs:121 in 484a0e8. [](commit_id = 484a0e8, deletion_comment = False)

@Bpendragon

Copy link
Copy Markdown
Contributor Author
                    return ReturnUnexpectedResponseCode(ref message, response.StatusCode);

Closed per discussion offline with eddy. ReturnUnexpectedResponseCode may need refectored for output and input to align better.


In reply to: 891391044


Refers to: Src/Plugins/Security/SEC101_046.DiscordApiCredentialsValidator.cs:115 in 484a0e8. [](commit_id = 484a0e8, deletion_comment = False)

@Bpendragon Bpendragon enabled auto-merge (squash) August 2, 2021 23:59

@eddynaka eddynaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🕐

@eddynaka eddynaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:shipit:

@Bpendragon Bpendragon merged commit e33d3ca into main Aug 3, 2021
@Bpendragon Bpendragon deleted the users/bpendragon/AddMockHttpValidators branch August 3, 2021 21:50
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