Sha256: b2a8f67e18bf5a4597d81d9a49d744e106ef9cb754c355eee769740224c000a5
Contents?: true
Size: 1.44 KB
Versions: 6
Compression:
Stored size: 1.44 KB
Contents
require './test/test_helper' class ChannelTest < Minitest::Test def get_first_channel VCR.use_cassette('channel search') do @first_channel = Access::Channel.search(member_key: 'API_RUBY_GEM_TEST', api_environment: 'stage').channels.first end end def test_channels_search VCR.use_cassette('channel search') do channels_response = Access::Channel.search(member_key: 'API_RUBY_GEM_TEST', api_environment: 'stage') assert channels_response.success first_channel = channels_response.channels.first assert_kind_of Access::ChannelResponse, channels_response assert_kind_of Array, channels_response.channels assert_kind_of Access::Channel, first_channel assert_kind_of Access::Link, first_channel.links.first end end def test_channels_find skip get_first_channel VCR.use_cassette('channel find') do channels_response = Access::Channel.find(@first_channel.key, member_key: 'API_RUBY_GEM_TEST', api_environment: 'stage') assert channels_response.success assert_kind_of Access::ChannelResponse, channels_response base_attributes = [:key, :channel_name, :channel_type, :channel_identifier, :channel_description, :links] base_attributes.each do |att| assert channels_response.respond_to?(att), "#{att} not found" end assert_kind_of Array, channels_response.links assert_kind_of Access::Link, channels_response.links.first end end end
Version data entries
6 entries across 6 versions & 1 rubygems