diff --git a/Gemfile.lock b/Gemfile.lock index 9d95cb2..b6f4949 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - circleci (0.2.3) + circleci (1.0.0) GEM remote: https://rubygems.org/ @@ -105,4 +105,4 @@ DEPENDENCIES yard (~> 0.9.5, >= 0.9.5) BUNDLED WITH - 1.12.5 + 1.13.0 diff --git a/lib/circleci/project.rb b/lib/circleci/project.rb index 3c26a5f..f871138 100644 --- a/lib/circleci/project.rb +++ b/lib/circleci/project.rb @@ -84,7 +84,7 @@ def self.delete_checkout_key(username, project, fingerprint) # @param project [String] - Name of project # @return [CircleCi::Response] - Response object def self.enable(username, project) - CircleCi.request("/project/#{username}/#{project}/enable").delete + CircleCi.request("/project/#{username}/#{project}/enable").post end ## diff --git a/spec/cassettes/CircleCi_Project/enable/successfully/is_verified_by_response.yml b/spec/cassettes/CircleCi_Project/enable/successfully/is_verified_by_response.yml index 958ae03..0e4b1d3 100644 --- a/spec/cassettes/CircleCi_Project/enable/successfully/is_verified_by_response.yml +++ b/spec/cassettes/CircleCi_Project/enable/successfully/is_verified_by_response.yml @@ -65,4 +65,114 @@ http_interactions: AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC7Ca3FXm9nAC5kpIQ+uB2a7ShJkj4PvjNJSsI1rmz2Z8eXDMLOEW08qGXBjFWlDtZkGtAw2U8UmaHKPcJ3YM+Ss5sw0sRURW3pPpqF0JzKvDaNg8UxDLBk8CFxb2YLjjSpM2G5BMY5w38Af/U/8Hhb284lg7sdbtM9rRLlDeYVEx+T/nVOWsH+j3SAICZfpKb7GCz1OCbH2lhEXQqPMin+0UYw4ePrB0NvtC/x55fQ+cK1K3jbyVkZIXRw1KZAhUjEGCLu3CYsqkWCpLUsAABv36Vdb7KH9/kWXhUGKsS8LeiVLrJQDFaENDbvBo4rum1ORhgbD72DtBZKON4r6/","fingerprint":"83:3d:57:76:98:96:f6:ae:20:57:18:84:a6:4d:58:9d"}]}' http_version: recorded_at: Fri, 29 Jul 2016 00:23:38 GMT +- request: + method: post + uri: https://circleci.com/api/v1/project/mtchavez/circleci/enable?circle-token= + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + Host: + - circleci.com + response: + status: + code: 403 + message: Forbidden + headers: + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 14 Sep 2016 19:23:57 GMT + Server: + - nginx + Set-Cookie: + - ab_test_user_seed=0.33017790522954604;Expires=Thu, 14 Sep 2017 19:23:57 +0000;Path=/;Secure + - ring-session=Wj%2FnkDJP69u1zoLlY8onTgRDaxYSs6GImvx%2Bo%2FjQhwDslQQEUuAUGaeRrjpdpyqQV9NzHa8OUITMNitbH5H2DQl0bdv1XHLbaLbsSg2pk3urc4Du2nm5VO3GaDPVxMiZvR84sn3AXXUP6hyB8%2FYfubu6r3H4%2BidOv%2F77brjejOyo9XcqWzPDJToLfy2WsqATmK48N3zdICNKBBFE2kCxSc6I%2BEbUSoOznZ85Iuyr66E%3D--QOvFXm%2FxpbIGhbeKgc6x3gyB4jzHBvfdoSdJXCLNtqk%3D;Path=/;HttpOnly;Expires=Thu, + 14 Sep 2017 18:05:54 +0000;Max-Age=31536000;Secure + X-Circleci-Identity: + - i-e1aff967 + X-Circleci-Request-Id: + - 75a1e232-7d2e-4a5c-85aa-6f1206e88ebd + X-Frame-Options: + - DENY + X-Route: + - "/enable" + Content-Length: + - '268' + Connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"message":"{\"message\":\"API rate limit exceeded for 54.210.21.22. + (But here''s the good news: Authenticated requests get a higher rate limit. + Check out the documentation for more details.)\",\"documentation_url\":\"https://developer.github.com/v3/#rate-limiting\"}"}' + http_version: + recorded_at: Wed, 14 Sep 2016 19:24:55 GMT +- request: + method: post + uri: https://circleci.com/api/v1/project/mtchavez/dotfiles/enable?circle-token= + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + Host: + - circleci.com + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 14 Sep 2016 19:27:56 GMT + Server: + - nginx + Set-Cookie: + - ab_test_user_seed=0.3396850799247606;Expires=Thu, 14 Sep 2017 19:27:55 +0000;Path=/;Secure + - ring-session=614bb2qcC7RQhoHxyBXJy%2F1VkAwMr94dmU%2Fgj8AZGVW3u7LI4G8Qm0V34haqYPrjoOLhEyBI1QaqRLA3m%2B6LqMnM9sPASwKfzk07d3wEaDx5MMuZtVNVq2L1uVCmBaXGMjSzKIJ96aZzKALmjSDpuX2xrBbCZ9%2B4s15Ssksn9Fc%2F8KXmgsbTp2GYFJ%2FAG5rXyWp9FvtSEdvpnw1IGgKb91xowXpbLKQTwngydhEkW4Q%3D--VM1aJyDVVUU88uDZXPdvonw8v%2BcPiTrKF4%2FDFFY45bg%3D;Path=/;HttpOnly;Expires=Thu, + 14 Sep 2017 17:17:56 +0000;Max-Age=31536000;Secure + Strict-Transport-Security: + - max-age=15724800 + X-Circleci-Identity: + - i-e5c3077a + X-Circleci-Request-Id: + - 77fb6407-c4f5-4892-a0c3-c5931bfa3345 + X-Circleci-Scopes: + - ":all" + - ":none" + - ":read-settings" + - ":status" + - ":trigger-builds" + - ":view-builds" + - ":write-settings" + X-Frame-Options: + - DENY + X-Route: + - "/enable" + Content-Length: + - '509' + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: '{"irc_server":null,"scopes":["write-settings","view-builds","read-settings","trigger-builds","all","status","none"],"irc_keyword":null,"followed":false,"vcs-type":"github","aws":{"keypair":null},"slack_webhook_url":null,"flowdock_api_token":null,"parallel":1,"username":"mtchavez","campfire_room":null,"extra":"","branches":{},"slack_subdomain":null,"setup":"","campfire_subdomain":null,"slack_notify_prefs":null,"irc_password":null,"vcs_url":"https://github.com/mtchavez/dotfiles","default_branch":"master","hipchat_api_token":null,"irc_username":null,"language":null,"slack_channel_override":null,"hipchat_notify":null,"slack_api_token":null,"has_usable_key":true,"irc_notify_prefs":null,"campfire_token":null,"slack_channel":null,"feature_flags":{"trusty-beta":false,"osx":false,"set-github-status":true,"build-prs-only":false,"fleet":null,"build-fork-prs":false,"autocancel-builds":false,"junit":true,"oss":true},"campfire_notify_prefs":null,"hipchat_room":null,"heroku_deploy_user":null,"irc_channel":null,"oss":true,"reponame":"dotfiles","hipchat_notify_prefs":null,"compile":"","dependencies":"","test":"","ssh_keys":[]}' + http_version: + recorded_at: Wed, 14 Sep 2016 19:28:37 GMT recorded_with: VCR 3.0.3 diff --git a/spec/cassettes/CircleCi_Project/enable/successfully/project/returns_the_circleci_project_settings.yml b/spec/cassettes/CircleCi_Project/enable/successfully/project/returns_the_circleci_project_settings.yml index 9e0d552..f31fda5 100644 --- a/spec/cassettes/CircleCi_Project/enable/successfully/project/returns_the_circleci_project_settings.yml +++ b/spec/cassettes/CircleCi_Project/enable/successfully/project/returns_the_circleci_project_settings.yml @@ -1,8 +1,8 @@ --- http_interactions: - request: - method: delete - uri: https://circleci.com/api/v1/project/mtchavez/circleci/enable?circle-token= + method: post + uri: https://circleci.com/api/v1/project/mtchavez/dotfiles/enable?circle-token= body: encoding: UTF-8 string: "{}" @@ -25,19 +25,19 @@ http_interactions: Content-Type: - application/json; charset=utf-8 Date: - - Fri, 29 Jul 2016 00:23:24 GMT + - Wed, 14 Sep 2016 19:29:40 GMT Server: - nginx Set-Cookie: - - ab_test_user_seed=0.3396850799247606;Expires=Sat, 29 Jul 2017 00:23:24 +0000;Path=/;Secure - - ring-session=qDnvmc7ZnQAUXGsGcJ%2FoRaxOYLDZhNkK2js6tW2Hqdw%2FuE2Q%2FQfUhUWZkorG2ELeuNdXgmuO%2F%2FZfv3zmurXOKggKuHFdomDLZJvnbTPJYW5AxwNMEmuCTgSJvsX3EsqfBlgQuXIQYwHW2d8yOTOY2dINGK8UPyBbm5uHUqiH526rkItWPWMxOTxLzQgd3%2BWkHXIA3%2FQi93UX7Db9BA3lRMgGyY4CKl6uuaFTzJ7sCCI%3D--10R8aQe3VOgcDVN5ohjZ3ttziG%2BD3hUiklTIYvw9NPY%3D;Path=/;HttpOnly;Expires=Sat, - 29 Jul 2017 00:19:56 +0000;Max-Age=31536000;Secure + - ab_test_user_seed=0.3396850799247606;Expires=Thu, 14 Sep 2017 19:29:39 +0000;Path=/;Secure + - ring-session=JioBvSt3bEs40leGd7LCRXIR%2FimuDeTc1RqyP51NoDTCc7TogbFuO3fxGo3cuFxrQDbXHLzgyv58AtpGa4%2F4qqhu4FdYPNTnzgwVRsLut59AG42g88PhukbjS%2BQro9BkZZaDeppb2Gy7dOhbfJpa8khy2nJjokD3OW39Y3EPloNGDwzmGeXTw4s3evBPifpxa0f5RgxPuJ2fmWr4xn3FOVOWQyWXPC3du4gkuN7dbKQ%3D--uj25OlvQBBZKDU30VBooOqNAvQeZrdjG0Aw%2BYTJxmJI%3D;Path=/;HttpOnly;Expires=Thu, + 14 Sep 2017 18:18:19 +0000;Max-Age=31536000;Secure Strict-Transport-Security: - max-age=15724800 X-Circleci-Identity: - - i-ffc60260 + - i-40bde5d0 X-Circleci-Request-Id: - - 4595a521-5309-4cdc-8d7c-982ae84b954d + - 86a010d0-a06a-4969-9aeb-cd662ac9be1a X-Circleci-Scopes: - ":all" - ":none" @@ -51,18 +51,74 @@ http_interactions: X-Route: - "/enable" Content-Length: - - '1370' + - '509' Connection: - keep-alive body: encoding: ASCII-8BIT - string: '{"irc_server":null,"scopes":["write-settings","view-builds","read-settings","trigger-builds","all","status","none"],"irc_keyword":null,"followed":false,"vcs-type":"github","aws":{"keypair":null},"slack_webhook_url":null,"flowdock_api_token":null,"parallel":1,"username":"mtchavez","campfire_room":null,"extra":"","branches":{"master":{"running_builds":[],"recent_builds":[{"build_num":230,"status":"failed","outcome":"failed","added-at":"2016-07-29T00:17:53.302Z"},{"build_num":232,"status":"failed","outcome":"failed","added-at":"2016-07-29T00:18:13.703Z"},{"build_num":228,"status":"failed","outcome":"failed","added-at":"2016-07-29T00:17:51.151Z"},{"build_num":229,"status":"failed","outcome":"failed","added-at":"2016-07-29T00:18:01.106Z"},{"build_num":231,"status":"failed","outcome":"failed","added-at":"2016-07-29T00:17:52.096Z"}],"pusher_logins":["mtchavez"]},"min-ruby-ver":{"running_builds":[],"recent_builds":[{"build_num":220,"status":"success","outcome":"success","added-at":"2016-07-28T03:57:42.973Z"},{"build_num":219,"status":"success","outcome":"success","added-at":"2016-07-28T03:58:37.895Z"}],"pusher_logins":["mtchavez"]},"pull%2F46":{"running_builds":[],"recent_builds":[{"build_num":91,"status":"success","outcome":"success","added-at":"2016-01-17T20:51:00.048Z"}],"pusher_logins":[]},"pull%2F66":{"running_builds":[],"recent_builds":[{"build_num":134,"status":"failed","outcome":"failed","added-at":"2016-03-14T16:57:59.459Z"}],"pusher_logins":[]},"pull%2F69":{"running_builds":[],"recent_builds":[{"build_num":139,"status":"success","outcome":"success","added-at":"2016-04-25T20:50:46.002Z"}],"pusher_logins":[]},"typo":{"running_builds":[],"recent_builds":[{"build_num":227,"status":"success","outcome":"success","added-at":"2016-07-29T00:13:47.745Z"},{"build_num":226,"status":"success","outcome":"success","added-at":"2016-07-29T00:10:45.273Z"},{"build_num":225,"status":"success","outcome":"success","added-at":"2016-07-29T00:09:01.773Z"}],"pusher_logins":["mtchavez"]}},"slack_subdomain":null,"setup":"","campfire_subdomain":null,"slack_notify_prefs":null,"irc_password":null,"vcs_url":"https://github.com/mtchavez/circleci","default_branch":"master","hipchat_api_token":null,"irc_username":null,"language":"Ruby","slack_channel_override":null,"hipchat_notify":null,"slack_api_token":null,"has_usable_key":false,"irc_notify_prefs":null,"campfire_token":null,"slack_channel":null,"feature_flags":{"trusty-beta":false,"osx":false,"set-github-status":true,"build-prs-only":false,"fleet":null,"build-fork-prs":false,"autocancel-builds":false,"junit":true,"oss":true},"campfire_notify_prefs":null,"hipchat_room":null,"post_dependencies":"","heroku_deploy_user":null,"irc_channel":null,"oss":true,"reponame":"circleci","hipchat_notify_prefs":null,"compile":"","dependencies":"","test":"bundle - exec rake rubocop && bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter - -o $CIRCLE_TEST_REPORTS/rspec/junit.xml","ssh_keys":[{"hostname":"hostname","public_key":"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC7Ca3FXm9nAC5kpIQ+uB2a7ShJkj4PvjNJSsI1rmz2Z8eXDMLOEW08qGXBjFWlDtZkGtAw2U8UmaHKPcJ3YM+Ss5sw0sRURW3pPpqF0JzKvDaNg8UxDLBk8CFxb2YLjjSpM2G5BMY5w38Af/U/8Hhb284lg7sdbtM9rRLlDeYVEx+T/nVOWsH+j3SAICZfpKb7GCz1OCbH2lhEXQqPMin+0UYw4ePrB0NvtC/x55fQ+cK1K3jbyVkZIXRw1KZAhUjEGCLu3CYsqkWCpLUsAABv36Vdb7KH9/kWXhUGKsS8LeiVLrJQDFaENDbvBo4rum1ORhgbD72DtBZKON4r6/","fingerprint":"83:3d:57:76:98:96:f6:ae:20:57:18:84:a6:4d:58:9d"},{"hostname":"hostname","public_key":"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC7Ca3FXm9nAC5kpIQ+uB2a7ShJkj4PvjNJSsI1rmz2Z8eXDMLOEW08qGXBjFWlDtZkGtAw2U8UmaHKPcJ3YM+Ss5sw0sRURW3pPpqF0JzKvDaNg8UxDLBk8CFxb2YLjjSpM2G5BMY5w38Af/U/8Hhb284lg7sdbtM9rRLlDeYVEx+T/nVOWsH+j3SAICZfpKb7GCz1OCbH2lhEXQqPMin+0UYw4ePrB0NvtC/x55fQ+cK1K3jbyVkZIXRw1KZAhUjEGCLu3CYsqkWCpLUsAABv36Vdb7KH9/kWXhUGKsS8LeiVLrJQDFaENDbvBo4rum1ORhgbD72DtBZKON4r6/","fingerprint":"83:3d:57:76:98:96:f6:ae:20:57:18:84:a6:4d:58:9d"},{"hostname":"hostname","public_key":"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC7Ca3FXm9nAC5kpIQ+uB2a7ShJkj4PvjNJSsI1rmz2Z8eXDMLOEW08qGXBjFWlDtZkGtAw2U8UmaHKPcJ3YM+Ss5sw0sRURW3pPpqF0JzKvDaNg8UxDLBk8CFxb2YLjjSpM2G5BMY5w38Af/U/8Hhb284lg7sdbtM9rRLlDeYVEx+T/nVOWsH+j3SAICZfpKb7GCz1OCbH2lhEXQqPMin+0UYw4ePrB0NvtC/x55fQ+cK1K3jbyVkZIXRw1KZAhUjEGCLu3CYsqkWCpLUsAABv36Vdb7KH9/kWXhUGKsS8LeiVLrJQDFaENDbvBo4rum1ORhgbD72DtBZKON4r6/","fingerprint":"83:3d:57:76:98:96:f6:ae:20:57:18:84:a6:4d:58:9d"},{"hostname":"hostname","public_key":"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC7Ca3FXm9nAC5kpIQ+uB2a7ShJkj4PvjNJSsI1rmz2Z8eXDMLOEW08qGXBjFWlDtZkGtAw2U8UmaHKPcJ3YM+Ss5sw0sRURW3pPpqF0JzKvDaNg8UxDLBk8CFxb2YLjjSpM2G5BMY5w38Af/U/8Hhb284lg7sdbtM9rRLlDeYVEx+T/nVOWsH+j3SAICZfpKb7GCz1OCbH2lhEXQqPMin+0UYw4ePrB0NvtC/x55fQ+cK1K3jbyVkZIXRw1KZAhUjEGCLu3CYsqkWCpLUsAABv36Vdb7KH9/kWXhUGKsS8LeiVLrJQDFaENDbvBo4rum1ORhgbD72DtBZKON4r6/","fingerprint":"83:3d:57:76:98:96:f6:ae:20:57:18:84:a6:4d:58:9d"}]}' + string: '{"irc_server":null,"scopes":["write-settings","view-builds","read-settings","trigger-builds","all","status","none"],"irc_keyword":null,"followed":false,"vcs-type":"github","aws":{"keypair":null},"slack_webhook_url":null,"flowdock_api_token":null,"parallel":1,"username":"mtchavez","campfire_room":null,"extra":"","branches":{},"slack_subdomain":null,"setup":"","campfire_subdomain":null,"slack_notify_prefs":null,"irc_password":null,"vcs_url":"https://github.com/mtchavez/dotfiles","default_branch":"master","hipchat_api_token":null,"irc_username":null,"language":null,"slack_channel_override":null,"hipchat_notify":null,"slack_api_token":null,"has_usable_key":true,"irc_notify_prefs":null,"campfire_token":null,"slack_channel":null,"feature_flags":{"trusty-beta":false,"osx":false,"set-github-status":true,"build-prs-only":false,"fleet":null,"build-fork-prs":false,"autocancel-builds":false,"junit":true,"oss":true},"campfire_notify_prefs":null,"hipchat_room":null,"heroku_deploy_user":null,"irc_channel":null,"oss":true,"reponame":"dotfiles","hipchat_notify_prefs":null,"compile":"","dependencies":"","test":"","ssh_keys":[]}' http_version: - recorded_at: Fri, 29 Jul 2016 00:23:38 GMT + recorded_at: Wed, 14 Sep 2016 19:31:20 GMT +- request: + method: get + uri: https://circleci.com/api/v1/project/mtchavez/dotfiles/checkout-key?circle-token= + body: + encoding: UTF-8 + string: "{}" + headers: + Accept: + - application/json + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + User-Agent: + - Ruby + Host: + - circleci.com + response: + status: + code: 200 + message: OK + headers: + Access-Control-Allow-Origin: + - "*" + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 14 Sep 2016 19:39:26 GMT + Server: + - nginx + Set-Cookie: + - ab_test_user_seed=0.3396850799247606;Expires=Thu, 14 Sep 2017 19:39:26 +0000;Path=/;Secure + - ring-session=M8pMCbslBpEEXb6Rf5zSGa1u82wmE5QDLXSTpB%2B%2B92TnuaxlQIeZsZFfgOKUp9TjU3q%2FevYewmuj8ar94SYP4OiHzIWtsm5mcZDp0%2BtTM6WYg%2FIALudOm50LPPiA1%2FekfhEGGLRigArF0Tps%2F6X1LktJPoba5sPw2pUpVZctePt2zMEe9yFpPR1j6JeNJBzFKjVMSfdYB3rRy0kogywxEtfjRrH3tI3XycJ%2BLvEnbHU%3D--sMH%2FJ8gD%2FCDvkr384JrB2%2F0qfljQDkFVrQxJfw6hb0M%3D;Path=/;HttpOnly;Expires=Thu, + 14 Sep 2017 19:07:34 +0000;Max-Age=31536000;Secure + Strict-Transport-Security: + - max-age=15724800 + X-Circleci-Identity: + - i-b7f8464f + X-Circleci-Request-Id: + - c369b248-d2cb-455d-a5f3-cc7d9ebdfb99 + X-Circleci-Scopes: + - ":all" + - ":none" + - ":read-settings" + - ":status" + - ":trigger-builds" + - ":view-builds" + - ":write-settings" + X-Frame-Options: + - DENY + X-Route: + - "/checkout-key" + Content-Length: + - '478' + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: '[{"public_key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGu+6azAexpj2cxe8v1s2L9UckUPpJahXFJMoR8VIMHjwCS7642Q+0uxaTS8Ylf4Ms3A8iyWceruWmYBWpF2X2nbK5Gxj9wSzO4HvWJ24mdrbrbsepoEHHkAjDhrAQ8FEqA0UsYyrmZTFg35ZtsJYnP5qIDP/uO4gfWZRVJa5PkdWTEiMAY4+k4VQv7mzkHzDthklVdChIJcVW7TzPfeFifkUAQLEwO3ufd2dG5hkREAP28z5EdgoLYm/zT2ZzwpuHifSMm+agzT7U2Xg7ifU/pSoaHz3vb1pkLIV3yAA6bJLYcF8SsKJrJm+sw8NGkfCPLcZ+ujTK5YsplwJzCbC3 + \n","type":"deploy-key","fingerprint":"a4:17:20:b9:02:7f:19:93:84:b8:41:be:be:d3:29:b9","login":null,"preferred":true,"time":"2016-09-14T19:29:40.055Z"}]' + http_version: + recorded_at: Wed, 14 Sep 2016 19:37:14 GMT recorded_with: VCR 3.0.3 diff --git a/spec/circleci/project_spec.rb b/spec/circleci/project_spec.rb index 239dcbc..4a923c8 100644 --- a/spec/circleci/project_spec.rb +++ b/spec/circleci/project_spec.rb @@ -393,7 +393,7 @@ describe 'enable' do context 'successfully' do - let(:res) { described_class.enable 'mtchavez', 'circleci' } + let(:res) { described_class.enable 'mtchavez', 'dotfiles' } it 'is verified by response' do expect(res).to be_instance_of(CircleCi::Response) @@ -401,12 +401,13 @@ end describe 'project' do + let(:res) { described_class.list_checkout_keys 'mtchavez', 'dotfiles' } subject { res.body } it 'returns the circleci project settings' do - expect(subject).to be_instance_of(Hash) - expect(subject['ssh_keys']).not_to be_empty - expect(subject).to have_key 'branches' + expect(subject).to be_instance_of(Array) + expect(subject.first).to have_key('public_key') + expect(subject.first['type']).to eql('deploy-key') end end end