diff --git a/features/ci_status.feature b/features/ci_status.feature index 62290e50a34e0b7e7272156d89db95394b3f053b..f036c06bc4777c26b6b063ec24dd1d02255a031c 100644 --- a/features/ci_status.feature +++ b/features/ci_status.feature @@ -1,8 +1,7 @@ Feature: hub ci-status Background: - Given I am in "pencilbox" git repo - Given the "origin" remote has url "git://github.com/michiels/pencilbox.git" + Given I am in "git://github.com/michiels/pencilbox.git" git repo And I am "michiels" on github.com with OAuth token "OTOKEN" Scenario: Fetch commit SHA diff --git a/test/hub_test.rb b/test/hub_test.rb index 0c255a55e475efed8c9f0c0190d4e5e76f315516..495e6276b23383b7886da8f3cddb13fd8469b0c1 100644 --- a/test/hub_test.rb +++ b/test/hub_test.rb @@ -257,32 +257,6 @@ class HubTest < Test::Unit::TestCase "push origin,staging master new-feature" end - def test_ci_status_use_last_sha - stub_command_output "rev-parse -q HEAD", "head_sha" - stub_command_output "rev-parse -q head_sha", "head_sha" - stub_request(:get, "https://api.github.com/repos/defunkt/hub/statuses/head_sha").to_return(:body => Hub::JSON.generate([ { :state => "success" } ])) - - expected = "success\n" - assert_output expected, "ci-status" - end - - def test_ci_status_with_sha - stub_command_output "rev-parse -q sha", "sha" - stub_request(:get, "https://api.github.com/repos/defunkt/hub/statuses/sha").to_return(:body => Hub::JSON.generate([ { :state => "failure" } ])) - - expected = "failure\n" - assert_output expected, "ci-status sha" - end - - def test_ci_status_without_github_project - stub_repo_url('gh:singingwolfboy/sekrit.git') - stub_branch('refs/heads/feature') - stub_tracking('feature', 'origin', 'feature') - - expected = "Aborted: the origin remote doesn't point to a GitHub repository.\n" - assert_output expected, "ci-status" - end - def test_pullrequest_from_branch_tracking_local stub_branch('refs/heads/feature') stub_tracking('feature', 'refs/heads/master')