-
Notifications
You must be signed in to change notification settings - Fork 191
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
Move to publishing api v2 #2394
Conversation
d95d778
to
4106194
Compare
4106194
to
ed91ee9
Compare
I've updated the |
|
||
perform_force_publishing_for(@draft_edition) | ||
|
||
assert_requested request | ||
requests.each { |request| assert_requested request } |
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 occurs frequently enough that it could be extracted into a shared assertion. I looked at webmock and it wouldn't be too much of an undertaking to contribute there also, perhaps.
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.
What would you call the new method?
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.
If the method lives within whitehall
or gds-api-adapters
, I'd suggest assert_all_requested(array)
. If it were contributed back to webmock
, I'd just allow passing an array into assert_requested
itself.
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 as @benilovj says. 👍
Looks good other than the small issue regarding the |
We still need to keep the v1 client around, because publish intents will continue to be published against the v1 client.
Publishing API v1 endpoints will be deprecated soon. v2 requires sending the content and links to different endpoints. Publish intents haven't been implemented in v2, so those call stay as they are.
I was just wondering about 472e149. Here, you're using V1 and V2 in parallel. We thought, when planning this for the contacts app ( |
@issyl0 It looks to me like only "publish intents" are being sent to v1. These aren't supported by v2 and won't be needed later. |
@elliotcm Ahh, OK. Thanks. |
e122d2c
to
a0ecb5a
Compare
4c1b940
to
6ed331d
Compare
We shouldn't refer to the draft store, because that's implementation detail. Saving the draft is what we're actually doing.
6ed331d
to
29c8a10
Compare
🎆 |
cc @binaryberry