Sha256: 5a4ecc684b8efb6aa452f044ec1abfbbe06f6ba726cc1092854985838b36e41c

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 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,
                     headers: { 'Content-type' => 'application/json' })
      end

      let(:app) { 4 }

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kintone-0.1.4 spec/kintone/command/form_spec.rb
kintone-0.1.3 spec/kintone/command/form_spec.rb