fix failing specs
This commit is contained in:
parent
dfc6a1273e
commit
da01eba035
1
Gemfile
1
Gemfile
|
@ -25,4 +25,5 @@ end
|
|||
group :development, :test do
|
||||
gem 'rake', '~> 0.9.2'
|
||||
gem 'micro_migrations', git: 'git://gist.github.com/2087829.git'
|
||||
gem 'debugger'
|
||||
end
|
||||
|
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -40,7 +40,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: git://github.com/travis-ci/travis-core.git
|
||||
revision: a1b1e8f3e1c31c66115923938d33ac24ba866940
|
||||
revision: 60f38e45ce1d739894839ef74f405348fb5f8481
|
||||
branch: sf-travis-api
|
||||
specs:
|
||||
travis-core (0.0.1)
|
||||
|
@ -117,10 +117,18 @@ GEM
|
|||
backports (2.6.4)
|
||||
builder (3.0.3)
|
||||
bunny (0.8.0)
|
||||
columnize (0.3.6)
|
||||
daemons (1.1.9)
|
||||
data_migrations (0.0.1)
|
||||
activerecord
|
||||
rake
|
||||
debugger (1.2.0)
|
||||
columnize (>= 0.3.1)
|
||||
debugger-linecache (~> 1.1.1)
|
||||
debugger-ruby_core_source (~> 1.1.3)
|
||||
debugger-linecache (1.1.2)
|
||||
debugger-ruby_core_source (>= 1.1.1)
|
||||
debugger-ruby_core_source (1.1.3)
|
||||
diff-lcs (1.1.3)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.0.0)
|
||||
|
@ -234,6 +242,7 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
bunny
|
||||
debugger
|
||||
factory_girl (~> 2.4.0)
|
||||
foreman
|
||||
gh!
|
||||
|
|
|
@ -12,7 +12,7 @@ describe Travis::Api::App::Endpoint::Accounts do
|
|||
end
|
||||
|
||||
it 'includes accounts' do
|
||||
get('/accounts', access_token: access_token.to_s).should be_ok
|
||||
get('/accounts', { access_token: access_token.to_s }, 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json, */*; q=0.01').should be_ok
|
||||
parsed_body['accounts'].should == [{
|
||||
'id' => user.id,
|
||||
'login' => user.login,
|
||||
|
|
|
@ -6,7 +6,7 @@ describe Travis::Api::App::Endpoint::Artifacts do
|
|||
|
||||
describe 'GET /artifacts/:id' do
|
||||
it 'loads the artifact' do
|
||||
get("/artifacts/#{id}").should be_ok
|
||||
get("/artifacts/#{id}", {}, 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json, */*; q=0.01').should be_ok
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,11 +11,11 @@ describe Travis::Api::App::Endpoint::Users do
|
|||
end
|
||||
|
||||
it 'needs to be authenticated' do
|
||||
get('/users').should_not be_ok
|
||||
get('/users', {}, 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json, */*; q=0.01').should_not be_ok
|
||||
end
|
||||
|
||||
it 'replies with the current user' do
|
||||
get('/users', access_token: access_token.to_s).should be_ok
|
||||
get('/users', { access_token: access_token.to_s }, 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json, */*; q=0.01').should be_ok
|
||||
parsed_body['user'].should == {
|
||||
'id' => user.id,
|
||||
'login' => user.login,
|
||||
|
|
|
@ -6,6 +6,7 @@ require 'sinatra/test_helpers'
|
|||
require 'logger'
|
||||
require 'gh'
|
||||
require 'multi_json'
|
||||
require 'debugger'
|
||||
|
||||
Travis.logger = Logger.new(StringIO.new)
|
||||
Travis::Api::App.setup
|
||||
|
|
Loading…
Reference in New Issue
Block a user