Sha256: 4eb3d482698a5603df743e39778acd4f7b2259c987aa3cf820f2f7d1bb77e7f2

Contents?: true

Size: 478 Bytes

Versions: 9

Compression:

Stored size: 478 Bytes

Contents

describe ChatWork::Client::MeMethods do
  describe "get_me", type: :api do
    subject { client.get_me(&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

9 entries across 9 versions & 1 rubygems

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