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

DSP-932: Don't allow missing StringLiteralV2 value if language tag given #1746

Merged
merged 9 commits into from
Oct 29, 2020

Conversation

SepidehAlassi
Copy link
Contributor

resolves DSP-932

closes #1418

@SepidehAlassi SepidehAlassi added API/Admin bug something isn't working labels Oct 28, 2020
@SepidehAlassi SepidehAlassi self-assigned this Oct 28, 2020
@SepidehAlassi SepidehAlassi changed the title DSP-932: Don't allow labels or comments with missing value DSP-932: Don't allow missing StringLiteralV2 value if language tag given Oct 29, 2020
Copy link

@benjamingeer benjamingeer left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!


val thrown = the [BadRequestException] thrownBy payload.parseJson.convertTo[CreateListApiRequestADM]

thrown.getMessage should equal ("String value is missing.")

Choose a reason for hiding this comment

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

I'm generally reluctant to check the contents of exception messages in tests, because exception messages often change over time, and then it's annoying to have to fix a lot of tests. But it's up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benjamingeer yeah, I need to check them. It is my paranoia ;-)

@SepidehAlassi
Copy link
Contributor Author

@benjamingeer Thanks for reviewing this. I just added a general test for directly checking StringLiteralV2. I am gonna remove the unnecessary checks in ListMessagesSpec. Is that Ok for you?

@benjamingeer
Copy link

OK that looks good!

@SepidehAlassi SepidehAlassi merged commit 7efc896 into develop Oct 29, 2020
@SepidehAlassi SepidehAlassi deleted the wip/DSP-932-validateListCommentsAndLabels branch October 29, 2020 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating a comment in a list without value shouldn't be allowed
2 participants