spec/transmission/rpc_spec.rb in transmission-rpc-ruby-0.1.0 vs spec/transmission/rpc_spec.rb in transmission-rpc-ruby-0.2.0
- old
+ new
@@ -1,41 +1,36 @@
describe Transmission::RPC do
describe '#get_session' do
-
describe 'with fields' do
-
before :each do
@rpc = Transmission::RPC.new
- fields = Transmission::Arguments::SessionGet.new(['version']).to_arguments
+ fields = Transmission::Fields::SessionGet.new(['version']).to_fields
stub_rpc_request
.with({body: session_get_body({fields: fields})})
.to_return(successful_response)
end
it 'should send the proper arguments' do
- @rpc.get_session fields: ['version']
+ @rpc.get_session ['version']
expect(@rpc.connector.response.status).to eq(200)
end
end
describe 'without fields' do
-
before :each do
@rpc = Transmission::RPC.new
- fields = Transmission::Arguments::SessionGet.new.to_arguments
+ fields = Transmission::Fields::SessionGet.new.to_fields
stub_rpc_request
.with({body: session_get_body({fields: fields})})
.to_return(successful_response)
end
it 'should send the proper arguments' do
@rpc.get_session
expect(@rpc.connector.response.status).to eq(200)
end
-
end
-
end
end
\ No newline at end of file