Sha256: e1148ed0af95bef4e2b1ab831d4ed2625dfe9fa2781ba0b9ece76351f88f626a

Contents?: true

Size: 633 Bytes

Versions: 20

Compression:

Stored size: 633 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

20 entries across 20 versions & 2 rubygems

Version Path
maestrano-rails-0.15.4 test/controllers/group_users_controller_test.rb
maestrano-rails-0.15.2 test/controllers/group_users_controller_test.rb
maestrano-rails-0.15.1 test/controllers/group_users_controller_test.rb
maestrano-rails-0.15.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.14.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.13.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.12.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.11.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.10.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.5 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.4 test/controllers/group_users_controller_test.rb
maestrano-rails-test-0.9.4 test/controllers/group_users_controller_test.rb
maestrano-rails-test-0.9.3 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.3 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.2 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.1 test/controllers/group_users_controller_test.rb
maestrano-rails-0.9.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.8.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.7.0 test/controllers/group_users_controller_test.rb
maestrano-rails-0.6.0 test/controllers/group_users_controller_test.rb