Sha256: d2ac179b95824f219a1148901058ce89967ad9d2222b4b28cd642ed2aaaabd62

Contents?: true

Size: 757 Bytes

Versions: 1

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'

describe Apitool::Client::Backup, order: :defined do
  before(:context) do
    @client = Apitool::Client::Backup.new({
      host: "127.0.0.1",
      port: 3001,
      ssl: false,
      token: API_KEY,
      version: "v1"
    })
  end

  it "should be possible to crud backups" do
    expect(@client.index.class).to be Array
    uuid = SecureRandom.uuid
    backup = "david"
    path = [uuid, backup].join('/')

    backup = @client.create(path)
    expect(@client.result).to be 200
    expect(backup[:backup][:path]).to eq path

    loaded_backup = @client.show(path)
    expect(@client.result).to be 200
    expect(loaded_backup[:backup][:path]).to eq path

    @client.destroy(path)
    expect(@client.result).to be 200
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apitool-client-0.0.8 spec/apitool/client/backup_spec.rb