Sha256: 7071e86f76fd19e0d2f035de99da79e84961441181ef479a1aceca06a533873b

Contents?: true

Size: 715 Bytes

Versions: 36

Compression:

Stored size: 715 Bytes

Contents

require_relative '../test_helper'

module OhlohScm::Adapters
	class GitHeadTest < OhlohScm::Test

		def test_head_and_parents
			with_git_repository('git') do |git|
				assert git.exist?
				assert_equal '1df547800dcd168e589bb9b26b4039bff3a7f7e4', git.head_token
				assert_equal '1df547800dcd168e589bb9b26b4039bff3a7f7e4', git.head.token
				assert git.head.diffs.any?

				assert_equal '2e9366dd7a786fdb35f211fff1c8ea05c51968b1', git.parents(git.head).first.token
				assert git.parents(git.head).first.diffs.any?
			end
		end

    def test_head_token
      with_git_repository('git_with_invalid_encoding') do |git|
        assert_nothing_raised do
          git.head_token
        end
      end
    end
	end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ohloh_scm-2.5.1 test/unit/git_head_test.rb
ohloh_scm-2.4.14 test/unit/git_head_test.rb
ohloh_scm-2.4.13 test/unit/git_head_test.rb
ohloh_scm-2.4.12 test/unit/git_head_test.rb
ohloh_scm-2.4.11 test/unit/git_head_test.rb
ohloh_scm-2.4.10 test/unit/git_head_test.rb
ohloh_scm-2.4.9 test/unit/git_head_test.rb
ohloh_scm-2.4.8 test/unit/git_head_test.rb
ohloh_scm-2.4.7 test/unit/git_head_test.rb
ohloh_scm-2.4.6 test/unit/git_head_test.rb
ohloh_scm-2.4.5 test/unit/git_head_test.rb
ohloh_scm-2.4.4 test/unit/git_head_test.rb
ohloh_scm-2.4.3 test/unit/git_head_test.rb
ohloh_scm-2.4.1 test/unit/git_head_test.rb
ohloh_scm-2.4.0 test/unit/git_head_test.rb
ohloh_scm-2.3.5 test/unit/git_head_test.rb
ohloh_scm-2.3.4 test/unit/git_head_test.rb
ohloh_scm-2.3.2 test/unit/git_head_test.rb
ohloh_scm-2.3.1 test/unit/git_head_test.rb
ohloh_scm-2.3.0 test/unit/git_head_test.rb