Sha256: b79aac503bb49c43f436ede1cddcbab234305342b6c558475c68b2135faa8e23

Contents?: true

Size: 1 KB

Versions: 27

Compression:

Stored size: 1 KB

Contents

require File.expand_path('../../../test_helper', __FILE__)

module Maestrano
  module Account
    class GroupTest < Test::Unit::TestCase
      include APITestHelper
      
      should "should be listable" do
        @api_mock.expects(:get).once.returns(test_response(test_account_group_array))
        c = Maestrano::Account::Group.all
        assert c.data.kind_of? Array
        c.each do |entity|
          assert entity.kind_of?(Maestrano::Account::Group)
        end
      end

      should "should not be updateable" do
        assert_raises NoMethodError do
          @api_mock.stubs(:put).returns(test_response(test_account_group))
          c = Maestrano::Account::Group.construct_from(test_account_group[:data])
          c.save
        end
      end
      
      should "should not be creatable" do
        assert_raises NoMethodError do
          @api_mock.stubs(:post).returns(test_response(test_account_group))
          c = Maestrano::Account::Group.create({name: "Bla"})
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
maestrano-1.0.6 test/maestrano/account/group_test.rb
maestrano-1.0.5 test/maestrano/account/group_test.rb
maestrano-1.0.4 test/maestrano/account/group_test.rb
maestrano-1.0.3 test/maestrano/account/group_test.rb
maestrano-1.0.2 test/maestrano/account/group_test.rb
maestrano-1.0.1 test/maestrano/account/group_test.rb
maestrano-1.0.0 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC9 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC8 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC7 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC6 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC5 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC4 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC3 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC2 test/maestrano/account/group_test.rb
maestrano-1.0.0.pre.RC1 test/maestrano/account/group_test.rb
maestrano-0.12.5 test/maestrano/account/group_test.rb
maestrano-0.12.4 test/maestrano/account/group_test.rb
maestrano-0.12.3 test/maestrano/account/group_test.rb
maestrano-0.12.2 test/maestrano/account/group_test.rb