Sha256: 0382c2b6840f3595ec4b627774ee16fc55a54f978a4cd22cc305994b287b251f

Contents?: true

Size: 464 Bytes

Versions: 10

Compression:

Stored size: 464 Bytes

Contents

describe ChatWork::Me do
  describe ".get", type: :api do
    subject { ChatWork::Me.get(&block) }

    before do
      stub_chatwork_request(:get, "/me")
    end

    it_behaves_like :a_chatwork_api, :get, "/me"

    context "when unauthorized" do
      before do
        stub_chatwork_request(:get, "/me", "/me", 401)
      end

      let(:block) { nil }

      it { expect { subject }.to raise_error(ChatWork::APIError, "Invalid API token") }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chatwork-1.0.1 spec/lib/chatwork/me_spec.rb
chatwork-1.0.0 spec/lib/chatwork/me_spec.rb
chatwork-0.12.3 spec/lib/chatwork/me_spec.rb
chatwork-0.12.2 spec/lib/chatwork/me_spec.rb
chatwork-0.12.1 spec/lib/chatwork/me_spec.rb
chatwork-0.12.0 spec/lib/chatwork/me_spec.rb
chatwork-0.11.0 spec/lib/chatwork/me_spec.rb
chatwork-0.10.0 spec/lib/chatwork/me_spec.rb
chatwork-0.9.0 spec/lib/chatwork/me_spec.rb
chatwork-0.8.0 spec/lib/chatwork/me_spec.rb