Sha256: c2e4f612437c9115ba5ce4f92c274112777be3be8f0b2c5d0199245ad44d27a5

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'
require 'kintone/command/app_acl'
require 'kintone/api'

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

  describe "#update" do
    subject { target.update(app, rights) }

    context "" do
      before(:each) do
        stub_request(
          :put,
          "https://example.cybozu.com/k/v1/app/acl.json"
        ).
        with(:body => {"app" => 1, "rights" => {"p1" => "abc", "p2" => "def"}}.to_json).
        to_return(:body => "{}", :status => 200)
      end

      let(:app) { 1 }
      let(:rights) { {"p1" => "abc", "p2" => "def"} }

      it { expect(subject).to eq({}) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kintone-0.0.4 spec/command/app_acl_spec.rb