spec/ssh_key_spec.rb in gitolite-0.0.2.alpha vs spec/ssh_key_spec.rb in gitolite-0.0.3.alpha

- old
+ new

@@ -22,10 +22,22 @@ key = File.join(key_dir, 'bob@zilla.com.pub') s = SSHKey.from_file(key) s.owner.should == 'bob@zilla.com' end + it "owner should be joe-bob@god-zilla.com for joe-bob@god-zilla.com@desktop.pub" do + key = File.join(key_dir, 'joe-bob@god-zilla.com@desktop.pub') + s = SSHKey.from_file(key) + s.owner.should == 'joe-bob@god-zilla.com' + end + + it "owner should be bob.joe@test.zilla.com for bob.joe@test.zilla.com@desktop.pub" do + key = File.join(key_dir, 'bob.joe@test.zilla.com@desktop.pub') + s = SSHKey.from_file(key) + s.owner.should == 'bob.joe@test.zilla.com' + end + it 'owner should be bob@zilla.com for bob@zilla.com@desktop.pub' do key = File.join(key_dir, 'bob@zilla.com@desktop.pub') s = SSHKey.from_file(key) s.owner.should == 'bob@zilla.com' end @@ -252,6 +264,6 @@ s2 = SSHKey.new(type, blob, email) s1.should == s2 end end -end \ No newline at end of file +end