Sha256: 49820f46fcc27120367aae08e7e52548d0aacd31158cbc8fb97dc474d2324691

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../../unit_spec_helper")

module JsTestServer::Server::Resources
  describe WebRoot do
    describe "GET / - ResourceNotFound" do
      it "returns a 404 error" do
        response = get("/i_dont_exist")
        response.should be_http(
          404,
          {},
          Regexp.new("File /i_dont_exist not found")
        )
      end
    end

    describe "PUT / - ResourceNotFound" do
      it "returns a 404 error" do
        response = put("/i_dont_exist")
        response.should be_http(
          404,
          {},
          Regexp.new("File /i_dont_exist not found")
        )
      end
    end

    describe "POST / - ResourceNotFound" do
      it "returns a 404 error" do
        response = post("/i_dont_exist")
        response.should be_http(
          404,
          {},
          Regexp.new("File /i_dont_exist not found")
        )
      end
    end

    describe "DELETE / - ResourceNotFound" do
      it "returns a 404 error" do
        response = delete("/i_dont_exist")
        response.should be_http(
          404,
          {},
          Regexp.new("File /i_dont_exist not found")
        )
      end
    end
  end
end    

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.12 spec/unit/js_test_core/resources/not_found_spec.rb
honkster-js-test-server-0.2.11 spec/unit/js_test_core/resources/not_found_spec.rb
honkster-js-test-server-0.2.10 spec/unit/js_test_core/resources/not_found_spec.rb
honkster-js-test-server-0.2.9 spec/unit/js_test_core/resources/not_found_spec.rb
js-test-server-0.2.8 spec/unit/js_test_core/resources/not_found_spec.rb
js-test-server-0.2.7 spec/unit/js_test_core/resources/not_found_spec.rb
js-test-server-0.2.6 spec/unit/js_test_core/resources/not_found_spec.rb
js-test-server-0.2.1 spec/unit/js_test_core/resources/not_found_spec.rb
js-test-server-0.2.0 spec/unit/js_test_core/resources/not_found_spec.rb