mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	[Brightbox] Test error when required args missing
This adds a test to confirm existing behaviour that ArgumentError is raised when `brightbox_client_id` or `brightbox_secret` is omitted.
This commit is contained in:
		
							parent
							
								
									42d8467433
								
							
						
					
					
						commit
						08a9b11995
					
				
					 1 changed files with 37 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,7 @@ require "minitest/autorun"
 | 
			
		|||
require "fog/brightbox"
 | 
			
		||||
 | 
			
		||||
describe Fog::Compute::Brightbox do
 | 
			
		||||
  describe "when global config is available" do
 | 
			
		||||
    before do
 | 
			
		||||
      @arguments = {
 | 
			
		||||
        :brightbox_auth_url => "http://localhost",
 | 
			
		||||
| 
						 | 
				
			
			@ -34,4 +35,15 @@ describe Fog::Compute::Brightbox do
 | 
			
		|||
    it "responds to #wrapped_request" do
 | 
			
		||||
      assert_respond_to @service, :wrapped_request
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe "when created without required arguments" do
 | 
			
		||||
    it "raises an error" do
 | 
			
		||||
      Fog.stub :credentials, {} do
 | 
			
		||||
        assert_raises ArgumentError do
 | 
			
		||||
          Fog::Compute::Brightbox.new({})
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue