Sha256: 1f09790b2b863bb43ffa3e4dcf9f6c1ee4b7ec921bc57d2f67ae8de03e372f71
Contents?: true
Size: 1.37 KB
Versions: 2
Compression:
Stored size: 1.37 KB
Contents
# frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake require 'spec_helper' RSpec.describe Slack::Web::Api::Endpoints::Functions do let(:client) { Slack::Web::Client.new } context 'functions_completeError' do it 'requires error' do expect { client.functions_completeError(function_execution_id: %q[Fx12345ABCDE]) }.to raise_error ArgumentError, /Required arguments :error missing/ end it 'requires function_execution_id' do expect { client.functions_completeError(error: %q[]) }.to raise_error ArgumentError, /Required arguments :function_execution_id missing/ end end context 'functions_completeSuccess' do it 'requires function_execution_id' do expect { client.functions_completeSuccess(outputs: %q[{"customer_id": "U0BPQUNTA"}]) }.to raise_error ArgumentError, /Required arguments :function_execution_id missing/ end it 'requires outputs' do expect { client.functions_completeSuccess(function_execution_id: %q[Fx12345ABCDE]) }.to raise_error ArgumentError, /Required arguments :outputs missing/ end it 'encodes outputs as json' do expect(client).to receive(:post).with('functions.completeSuccess', {function_execution_id: %q[Fx12345ABCDE], outputs: %q[{"data":["data"]}]}) client.functions_completeSuccess(function_execution_id: %q[Fx12345ABCDE], outputs: {:data=>["data"]}) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slack-ruby-client-2.4.0 | spec/slack/web/api/endpoints/functions_spec.rb |
slack-ruby-client-2.3.0 | spec/slack/web/api/endpoints/functions_spec.rb |