Sha256: ddd32d261f1d61306d006f8c2dab5ff98ff4c765734e97d30825f4493fa22eb9

Contents?: true

Size: 580 Bytes

Versions: 12

Compression:

Stored size: 580 Bytes

Contents

require 'test_helper'

class GroupsControllerTest < ActionController::TestCase
  tests Maestrano::Account::GroupsController

  context "unauthenticated" do
    should "deny access" do
      delete :destroy, id: 'cld-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, id: 'cld-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/groups_controller_test.rb
maestrano-rails-1.0.3 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.2 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC8 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC7 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC6 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC5 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC4 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC3 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC2 test/controllers/groups_controller_test.rb
maestrano-rails-1.0.0.pre.RC1 test/controllers/groups_controller_test.rb