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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create request tests #74

Merged
merged 1 commit into from
Jul 20, 2015
Merged

Conversation

cojoj
Copy link
Contributor

@cojoj cojoj commented Jul 20, 2015

Oi! 馃嚞馃嚙

I've created test suite for XcodeServerEndpoints with purpose of testing createRequest() but it looks like it's mostly tested (or at least covered in other tests), so I've only created test case for malformed URLs passed to this method.

We're missing code coverage for those lines:

catch {
    let error = error as NSError
    Log.error("Parsing error \(error.description)")
    return nil
}

but it's complicated as I can't invent any failable case for NSJSONSerialization.dataWithJSONObject() as earlier we make sure we pass NSDictionary and any valid dictionary will be a valid JSON in that case.


Still no update for guard statement bug and code put directly after guard is never marked in test coverage... 馃槶

@czechboy0
Copy link
Member

Ignore Bitrise, I was testing it and it just doesn't work.

Anyway - to your PR, looks good. To your question - if we can always just use createRequest, then we shouldn't be testing a case that can never happen. So I think it's fine.

@czechboy0
Copy link
Member

Do you want to add more tests to this PR (is this WIP?)

@cojoj
Copy link
Contributor Author

cojoj commented Jul 20, 2015

Nah, it's ready to merge as there's nothing more to test ATM!

One more thing... Let me put some emoji

馃槒

Okey, now it's ready 馃槅馃憤

@buildasaur
Copy link
Collaborator

Result of Integration 2

Duration: 45 seconds
Result: Perfect build! All 28 tests passed. 馃憤
Test Coverage: 44%.

czechboy0 pushed a commit that referenced this pull request Jul 20, 2015
@czechboy0 czechboy0 merged commit 4650311 into buildasaurs:swift-2 Jul 20, 2015
@czechboy0
Copy link
Member

Thanks @cojoj!

@cojoj cojoj deleted the create-request-test branch July 20, 2015 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants