Skip to content

Commit

Permalink
update tests to respect that config on build now returns a default hash
Browse files Browse the repository at this point in the history
  • Loading branch information
joshk committed Aug 6, 2011
1 parent b00a06b commit 0c8464b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/integration/builds_controller_test.rb
Expand Up @@ -69,6 +69,7 @@ def setup
'committer_name' => 'Sven Fuchs',
'committer_email' => 'svenfuchs@artweb-design.de',
'started_at' => build.started_at,
'config' => {}
},
'msg_id' => '1'
}], channel.messages.first
Expand Down Expand Up @@ -148,6 +149,7 @@ def setup
'committer_name' => 'Sven Fuchs',
'committer_email' => 'svenfuchs@artweb-design.de',
'started_at' => build.started_at,
'config' => {}
},
'msg_id' => '0'
}], channel.messages.first
Expand Down
3 changes: 2 additions & 1 deletion test/unit/json_test.rb
Expand Up @@ -13,7 +13,7 @@ def setup
end

test 'as_json(:for => :job) includes everything required for the resque build job (2)' do
expected = { 'id' => build.id, 'number' => '1', 'commit' => '62aae5f70ceee39123ef', 'branch' => 'master' }
expected = { 'id' => build.id, 'number' => '1', 'commit' => '62aae5f70ceee39123ef', 'branch' => 'master', 'config' => {} }
assert_equal_hashes expected, build.as_json(:for => :job)

expected = { 'id' => repository.id, :slug => 'svenfuchs/minimal' }
Expand Down Expand Up @@ -42,6 +42,7 @@ def setup
'committer_email' => 'svenfuchs@artweb-design.de',
'author_name' => nil,
'author_email' => nil,
'config' => {}
}
assert_equal_hashes expected, build.as_json(:for => :'build:started')

Expand Down
2 changes: 1 addition & 1 deletion test/unit/travis/worker_test.rb
Expand Up @@ -81,7 +81,7 @@ def remove_custom_workers

test "#enqueue : job is queued on the standard build queue" do
job_hash = {
'build' => { 'branch' => 'master', 'commit' => '62aae5f70ceee39123ef', 'id' => 1, 'number' => '1' },
'build' => { 'branch' => 'master', 'commit' => '62aae5f70ceee39123ef', 'id' => 1, 'number' => '1', 'config' => {} },
'repository' => { 'id' => 1, :slug => 'svenfuchs/minimal' },
:queue => 'builds'
}
Expand Down

0 comments on commit 0c8464b

Please sign in to comment.