Sha256: e356009d50d91f8eb48fe4f4b12deefe532f910b3a3583e32662a7501eed6ad8
Contents?: true
Size: 1.05 KB
Versions: 25
Compression:
Stored size: 1.05 KB
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class FileObjectTest < Test::Unit::TestCase include Octopi def setup fake_everything @user = User.find("fcoury") @repo = @user.repositories.find("octopi") end context "finding" do context "with strings" do should "work" do FileObject.find(:user => "fcoury", :repository => "octopi", :sha => "f6609209c3ac0badd004512d318bfaa508ea10ae") end end context "with objects" do should "work" do FileObject.find(:user => @user, :repository => @repo, :sha => "f6609209c3ac0badd004512d318bfaa508ea10ae") end end context "invalid sha" do should "not work" do # sha below is "ryan" exception = assert_raise NotFound do FileObject.find(:user => @user, :repository => @repo, :sha => "ea3cd978650417470535f3a4725b6b5042a6ab59") end assert_equal "The FileObject you were looking for could not be found, or is private.", exception.message end end end end
Version data entries
25 entries across 25 versions & 4 rubygems