diff --git a/WordPress/Classes/ViewRelated/Blog/PublicizeConnectionURLMatcher.swift b/WordPress/Classes/ViewRelated/Blog/PublicizeConnectionURLMatcher.swift index 780446d96361..98c7673b05c8 100644 --- a/WordPress/Classes/ViewRelated/Blog/PublicizeConnectionURLMatcher.swift +++ b/WordPress/Classes/ViewRelated/Blog/PublicizeConnectionURLMatcher.swift @@ -51,7 +51,7 @@ struct PublicizeConnectionURLMatcher { case .declinePath: return "/decline" case .authorizationPrefix: - return "https://public-api.wordpress.com/connect/" + return "https://public-api.wordpress.com/connect" default: return nil } @@ -137,8 +137,8 @@ struct PublicizeConnectionURLMatcher { return .deny } - // If we've made it this far and verifyRange is found then we're *probably* - // verifying the oauth request. There are edge cases ( :cough: tumblr :cough: ) + // If we've made it this far and the `action=verify` query param is present then we're + // *probably* verifying the oauth request. There are edge cases ( :cough: tumblr :cough: ) // where verification is declined and we get a false positive. if url(matchURL, contains: .verifyActionItem) { return .verify diff --git a/WordPress/WordPressTest/PublicizeAuthorizationURLComponentsTests.swift b/WordPress/WordPressTest/PublicizeAuthorizationURLComponentsTests.swift index 7f2cafaea1d5..5f8c07a6dd66 100644 --- a/WordPress/WordPressTest/PublicizeAuthorizationURLComponentsTests.swift +++ b/WordPress/WordPressTest/PublicizeAuthorizationURLComponentsTests.swift @@ -2,12 +2,6 @@ import XCTest @testable import WordPress class PublicizeConnectionURLMatcherTests: XCTestCase { - override func setUp() { - } - - override func tearDown() { - } - func testURLContainingAuthorizationItem() { let url = URL(string: "https://public-api.wordpress.com/connect/?action=verify")! XCTAssertTrue(PublicizeConnectionURLMatcher.url(url, contains: .authorizationPrefix)) @@ -48,7 +42,7 @@ class PublicizeConnectionURLMatcherTests: XCTestCase { XCTAssertTrue(PublicizeConnectionURLMatcher.url(url, contains: .codeItem)) } - func testURLContainingErrorItemItem() { + func testURLContainingErrorItem() { let url = URL(string: "https://public-api.wordpress.com/connect/?state=abcdef&error=1234567")! XCTAssertTrue(PublicizeConnectionURLMatcher.url(url, contains: .errorItem)) }