Sha256: a9dc4862f248da848285388302606a5d2328a1c68b778b1b5c0b57b3917e3277
Contents?: true
Size: 839 Bytes
Versions: 1
Compression:
Stored size: 839 Bytes
Contents
require_relative "test_helper" class ClientFakeTest < Test::Unit::TestCase def setup @client = TransmissionApi::ClientFake.new({}) end def test_all assert_equal( "77831ec368308f1031434c5581a76fd0c3e06cfd", @client.all.first["hashString"] ) end def test_find assert_equal( "77831ec368308f1031434c5581a76fd0c3e06cfd", @client.find("77831ec368308f1031434c5581a76fd0c3e06cfd")["hashString"] ) end def test_create assert_equal( "77831ec368308f1031434c5581a76fd0c3e06cfd", @client.create("filename")["hashString"] ) end def test_destroy torrents = [ { "hashString" => "A" }, { "hashString" => "B" }, { "hashString" => "C" }, ] @client.expects(:torrents).returns(torrents) @client.destroy("B") assert_equal(["A", "C"], torrents.map{ |e| e["hashString"] }) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
transmission_api-0.0.7 | test/client_fake_test.rb |