Sha256: 711f592120790cac68b83bff635d0fb95da8acbb446d40333f490fbe36000b70

Contents?: true

Size: 626 Bytes

Versions: 12

Compression:

Stored size: 626 Bytes

Contents

require 'test_helper'

class GroupUsersControllerTest < ActionController::TestCase
  tests Maestrano::Account::GroupUsersController

  context "unauthenticated" do
    should "deny access" do
      delete :destroy, group_id: 'cld-1', id: 'usr-1'
      assert_equal '401', response.code
    end
  end

  context "authenticated" do
    setup do
      @request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64.encode64("#{Maestrano.param('api.id')}:#{Maestrano.param('api.key')}")
    end

    should "be successful" do
      delete :destroy, group_id: 'cld-1', id: 'usr-1'
      assert_equal '200', response.code
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
maestrano-rails-1.0.4 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.3 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.2 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC8 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC7 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC6 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC5 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC4 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC3 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC2 test/controllers/group_users_controller_test.rb
maestrano-rails-1.0.0.pre.RC1 test/controllers/group_users_controller_test.rb