Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (25 sloc) 0.918 kB
require 'helper'
class TestCIJoeQueue < Test::Unit::TestCase
def test_a_disabled_queue
subject = CIJoe::Queue.new(false)
subject.append_unless_already_exists("test")
assert_equal false, subject.waiting?
end
def test_adding_two_items_to_a_queue
subject = CIJoe::Queue.new(true)
subject.append_unless_already_exists("test")
subject.append_unless_already_exists(nil)
assert_equal true, subject.waiting?
assert_equal "test", subject.next_branch_to_build
assert_equal nil, subject.next_branch_to_build
assert_equal false, subject.waiting?
end
def test_adding_two_duplicate_items_to_a_queue
subject = CIJoe::Queue.new(true)
subject.append_unless_already_exists("test")
subject.append_unless_already_exists("test")
assert_equal true, subject.waiting?
assert_equal "test", subject.next_branch_to_build
assert_equal false, subject.waiting?
end
end
Jump to Line
Something went wrong with that request. Please try again.