Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Update facebook API version to 2.12 #1673

Merged
merged 1 commit into from
Feb 28, 2018
Merged

Update facebook API version to 2.12 #1673

merged 1 commit into from
Feb 28, 2018

Conversation

Tratcher
Copy link
Member

#1306 No behavioral changes.
Our current version (2.6) will expire July 13, 2018.

@Tratcher Tratcher added this to the 2.1.0-preview2 milestone Feb 28, 2018
@Tratcher Tratcher self-assigned this Feb 28, 2018
@Tratcher Tratcher requested a review from HaoK February 28, 2018 17:49
@@ -585,7 +585,7 @@ private void ConfigureDefaults(FacebookOptions o)
var transaction = await server.SendAsync("http://example.com/base/login");
Assert.Equal(HttpStatusCode.Redirect, transaction.Response.StatusCode);
var location = transaction.Response.Headers.Location.AbsoluteUri;
Assert.Contains("https://www.facebook.com/v2.6/dialog/oauth", location);
Assert.Contains("https://www.facebook.com/v2.12/dialog/oauth", location);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Assert using the constants?

Copy link
Contributor

Choose a reason for hiding this comment

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

I could go either way on that. There are pros/cons to using the fields vs. repeating the data.

Copy link
Member

@HaoK HaoK Feb 28, 2018

Choose a reason for hiding this comment

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

Yeah but in this case isn't it basically always a bug if these ever are inconsistent since we are exposing this in our Defaults class?

Copy link
Contributor

Choose a reason for hiding this comment

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

Pros to using const's:

  • Less work to maintain because you make the change in one place

Cons to using const's:

  • Less clear when you make a src change to see what effect it has on the product

So, yes, it'd be a bug if it's inconsistent, and this test would tell you that, and you have to fix it (of course). Using a const would avoid the need to have to change the test.

Copy link
Member

Choose a reason for hiding this comment

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

But mainly the upside is it makes future updates trivial, as its just updating the constant

Copy link
Contributor

Choose a reason for hiding this comment

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

And that's why I'm fine either way 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually prefer updating it separately in the tests. It's like having to enter your e-mail address twice to confirm you did it right.

Copy link
Contributor

@Eilon Eilon left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

@Tratcher Tratcher merged commit cc8acdf into dev Feb 28, 2018
@Tratcher Tratcher deleted the tratcher/fb branch February 28, 2018 18:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants