Sha256: 7dfb37fa0dfc9b316e11c5d208f1b2dad63ab80bb605cd18d10f31de34a2e508

Contents?: true

Size: 643 Bytes

Versions: 4

Compression:

Stored size: 643 Bytes

Contents

require 'spec_helper'
#
# Specs for returned data for /_status/* endpoints.
#
# Endpoint checks (i.e. check HTTP success) are in  endpoints_spec.rb

describe Nagira do 
  
  set :environment, ENV['RACK_ENV'] || :test
  include Rack::Test::Methods
  def app 
    @app ||= Nagira
  end
  
  before :all do
    get "/_status/_list.json"
    @host = JSON.parse(last_response.body).first
  end

  context "/_hosts/:host/_services" do 

    before :each do 
      get "/_status/#{@host}/_services"
      @data = JSON.parse(last_response.body)
    end

    it "return services list " do
        @data.should be_a_kind_of Hash
    end
  end

    
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nagira-0.3.3 spec/get/services_spec.rb
nagira-0.3.2 spec/get/services_spec.rb
nagira-0.3.1 spec/get/services_spec.rb
nagira-0.3.0 spec/get/services_spec.rb