Sha256: 0d5f79b375fb0c9f3a01f3b8d8ac5cdb8f5c2d38cb2e8894375ffaf8f0cbec81

Contents?: true

Size: 841 Bytes

Versions: 25

Compression:

Stored size: 841 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

class IssueSetTest < Test::Unit::TestCase
  include Octopi
  
  def setup
    fake_everything
    @user = User.find("fcoury")
    @repo = @user.repository("octopi")
  end

  
  context IssueSet do
    should "be able to find a specific issue" do
      assert_not_nil @repo.issues.find(28)
    end
    
    should "not be able to find an issue that doesn't exist" do
      exception = assert_raise Octopi::NotFound do
        @repo.issues.find("not-a-number")
      end
      
      assert_equal "The Issue you were looking for could not be found, or is private.", exception.message
    end
    
    should "be able to look for an issue" do
      results = @repo.issues.search(:keyword => "test")
      assert_not_nil results
      assert_equal 1, results.size
    end
    
  end
end

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
octopi-0.4.5 test/issue_set_test.rb
octopi-0.4.4 test/issue_set_test.rb
octopi-0.4.2 test/issue_set_test.rb
octopi-0.4.1 test/issue_set_test.rb
octopi-0.4.0 test/issue_set_test.rb
octopi-0.3.0 test/issue_set_test.rb
dcuddeback-octopi-0.2.12 test/issue_set_test.rb
dcuddeback-octopi-0.2.11 test/issue_set_test.rb
dcuddeback-octopi-0.2.9 test/issue_set_test.rb
dcuddeback-octopi-0.2.8 test/issue_set_test.rb
devver-octopi-0.2.14 test/issue_set_test.rb
tpitale-octopi-0.3.0 test/issue_set_test.rb
devver-octopi-0.2.13 test/issue_set_test.rb
devver-octopi-0.2.12 test/issue_set_test.rb
octopi-0.2.8 test/issue_set_test.rb
devver-octopi-0.2.11 test/issue_set_test.rb
devver-octopi-0.2.10 test/issue_set_test.rb
devver-octopi-0.2.9 test/issue_set_test.rb
devver-octopi-0.2.8 test/issue_set_test.rb
octopi-0.2.7 test/issue_set_test.rb