Sha256: c2537e05d38bfea043a77d339460dcdf7b1aa72cd666e0bdc4bee8e3a5ffdd9c

Contents?: true

Size: 529 Bytes

Versions: 2

Compression:

Stored size: 529 Bytes

Contents

require 'test_helper'

class TestSession < MiniTest::Unit::TestCase
  def setup
    @coop = Coop.new("test@example.com", "password")
  end

  def test_new_is_session
    assert_instance_of Coop::Session, @coop
  end

  def test_group
    @group = @coop.group(12345)
    assert_instance_of Coop::Group, @group
  end

  def test_groups
    stub_get("/groups").with({
      headers: { 'Accept' => 'application/json' }
    }).to_return({
      body: fixture('groups.json')
    })

    assert_instance_of Array, @coop.groups
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
coop-1.1.1 test/coop/test_session.rb
coop-1.1.0 test/coop/test_session.rb