Sha256: 4df1e1c3c51160ddd4753acfaceb9fc3f3f3441db1dad028dfabb3f349b0a858

Contents?: true

Size: 615 Bytes

Versions: 4

Compression:

Stored size: 615 Bytes

Contents

require 'spec_helper'
require 'kintone/command/form'
require 'kintone/api'

describe Kintone::Command::Form do
  let(:target) { Kintone::Command::Form.new(api) }
  let(:api) { Kintone::Api.new('example.cybozu.com', 'Administrator', 'cybozu') }

  describe '#get' do
    subject { target.get(app) }

    context '' do
      before(:each) do
        stub_request(
          :get,
          'https://example.cybozu.com/k/v1/form.json?app=4'
        )
          .to_return(body: "{\"result\":\"ok\"}", status: 200)
      end

      let(:app) { 4 }

      it { expect(subject).to eq 'result' => 'ok' }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kintone-0.1.2 spec/kintone/command/form_spec.rb
kintone-0.1.1 spec/kintone/command/form_spec.rb
kintone-0.1.0 spec/kintone/command/form_spec.rb
kintone-0.0.5 spec/kintone/command/form_spec.rb