Sha256: 9536ef26488406ab433904b0bbd0b010b80f65b3a55800c96cc456271753dce0

Contents?: true

Size: 908 Bytes

Versions: 2

Compression:

Stored size: 908 Bytes

Contents

require 'spec_helper'
require 'json'
describe TestdroidAPI::Files do
  before :all do
    VCR.use_cassette('fu_oauth2_auth_files') do 
      @user = client_local_host.authorize
    end
  end
  
  it 'get app file ' do 
    project33029366 = nil
    VCR.use_cassette('f_android_app_file') do
       project33029366 =  @user.projects.get(100800)
       project33029366.files.app.should_not eq nil
      
    end
  end
  it 'upload apks' do 
    project33029366 = nil
    VCR.use_cassette('f_get_project_33029366') do
      
      project33029366 =  @user.projects.get(100800)
      project33029366.should_not eq nil
    end
    VCR.use_cassette('f_upload_files') do
      file_name = 'apk.apk'
      file_path = File.join(File.dirname(__FILE__), 'fixtures', file_name)
      reply = project33029366.files.uploadApplication(file_path)
      expect(reply.original_name).to eq(file_name)
      
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
testdroid-api-client-0.1.2 spec/files_spec.rb
testdroid-api-client-0.1.1 spec/files_spec.rb