Sha256: 678da8cc3b2e8cde3fea4af4123e09808b6f156a11bc91760f50f8146ab0139b

Contents?: true

Size: 541 Bytes

Versions: 14

Compression:

Stored size: 541 Bytes

Contents

require 'test_helpers'

class HelloWorldIntegrationTest < MiniTest::Unit::TestCase

  def test_default_response
    TestApi.get "/hello_world"
    assert_api_response
    assert_equal "Hello World", TestApi.json_response['message']
    assert Time.parse(TestApi.json_response['at']) < Time.now
  end

  def test_customized_response
    TestApi.get "/hello_world", :name => "Matt"
    assert_api_response
    assert_equal "Hello Matt", TestApi.json_response['message']
    assert Time.parse(TestApi.json_response['at']) < Time.now
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wd_sinatra-2.0.0 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.6 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.5 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.4 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.3 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.2 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.1 templates/test/integration/hello_world_test.rb
wd_sinatra-1.0.0 templates/test/integration/hello_world_test.rb
wd_sinatra-0.3.2 templates/test/integration/hello_world_test.rb
wd_sinatra-0.3.1 templates/test/integration/hello_world_test.rb
wd_sinatra-0.3.0 templates/test/integration/hello_world_test.rb
wd_sinatra-0.2.6 templates/test/integration/hello_world_test.rb
wd_sinatra-0.2.5 templates/test/integration/hello_world_test.rb
wd_sinatra-0.2.4 templates/test/integration/hello_world_test.rb