-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HIPP-364: Add service layer in api-hub-applications #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
app/uk/gov/hmrc/apihubapplications/controllers/ApplicationsController.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/models/application/ApplicationLenses.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/repositories/ApplicationsRepository.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/repositories/ApplicationsRepository.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/repositories/ApplicationsRepository.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/services/ApplicationsService.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/apihubapplications/services/ApplicationsService.scala
Outdated
Show resolved
Hide resolved
it/uk/gov/hmrc/apihubapplications/ApplicationsServiceIntegrationSpec.scala
Outdated
Show resolved
Hide resolved
Quite a few unused imports. Just run
|
app/uk/gov/hmrc/apihubapplications/controllers/ApplicationsController.scala
Outdated
Show resolved
Hide resolved
A good change to make to the codebase 👍 Just need to address the comments and avoid changing/introducing new behaviour. |
app/uk/gov/hmrc/apihubapplications/models/application/ApplicationLenses.scala
Show resolved
Hide resolved
.addHttpHeaders(("Content-Type", "application/json")) | ||
.put(statusUpdateJson) | ||
.futureValue | ||
|
||
response.status shouldBe 400 | ||
response.status shouldBe 404 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own notes: my first thought here was, "should this be a 400 or 404"? But I guess it's 404 because we can't find the scope in a PENDING state. So it's fine as is 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check A/C of HIPP-251. I think it is correct as this test is about adding scopes to invalid environment, e.g. "env-does-not-exist"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test does not have an invalid environment - it is trying to change the scope on prod of a scope that is already approved. Either way - it's fine, it was just a note for myself so feel free to resolve this conversation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the Application Lenses test to write. Everything else looks great. I've checked out the code and tested it using Postman. I'm just going to add the AC about approving a scope that is already approved as an AC so we have a record of the behaviour. Nevermind, I just saw you did that, thanks!
…om test "pendingScopes"
https://jira.tools.tax.service.gov.uk/browse/HIPP-364