Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (26 sloc) 0.923 kb
require "test_helper"
context "Rugged::Tag tests" do
setup do
@path = File.dirname(__FILE__) + '/fixtures/testrepo.git/'
@repo = Rugged::Repository.new(@path)
end
test "can read the tag data" do
oid = "0c37a5391bbff43c37f0d0371823a5509eed5b1d"
obj = @repo.lookup(oid)
assert_equal oid, obj.oid
assert_equal :tag, obj.type
assert_equal "test tag message\n", obj.message
assert_equal "v1.0", obj.name
assert_equal "5b5b025afb0b4c913b4c338a42934a3863bf3644", obj.target.oid
assert_equal :commit, obj.target_type
c = obj.tagger
assert_equal "Scott Chacon", c[:name]
assert_equal 1288114383, c[:time].to_i
assert_equal "schacon@gmail.com", c[:email]
end
test "can read the tag oid only" do
oid = "0c37a5391bbff43c37f0d0371823a5509eed5b1d"
obj = @repo.lookup(oid)
assert_equal "5b5b025afb0b4c913b4c338a42934a3863bf3644", obj.target_oid
end
end
Jump to Line
Something went wrong with that request. Please try again.