Failure Reference: Expected response to be a <redirect>, but was <200>

What does “Expected response to be a , but was <200>” means?

Just what it says, presumably you have specified a test that expected a redirection but instead the response was the html response code 200 (OK).

You can look in log/test.log to get some more clues to what is happening.

Colin

Thanks Colin,

So can I response you like code 200? :slight_smile:

Thanks Colin,

So can I response you like code 200? :slight_smile:

Sorry, I don't understand.

By the way, please don't top post, it makes it easier to follow the thread if you respond inline as I have done. Thanks.

Colin

I mean I’m pointing out this.

a redirection but instead the response was the html response code 200 (OK).

So do you mean code 200 stands for OK?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

I find google is often useful for finding this sort of information.

Colin

If you're going to do web development, you're going to have to be familiar with the basics of HTTP, including status codes:

<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&gt;

If you're going to do web development, you're going to have to be familiar with the basics of HTTP, including status codes:

Amen - what he said :slight_smile:

<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&gt;

though RFC 2616 is now superseded by:

RFC7230 - HTTP/1.1: Message Syntax and Routing - low-level message parsing and connection management   RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing RFC7231 - HTTP/1.1: Semantics and Content - methods, status codes and headers   RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content RFC7232 - HTTP/1.1: Conditional Requests - e.g., If-Modified-Since   RFC 7232 - Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests RFC7233 - HTTP/1.1: Range Requests - getting partial content   RFC 7233 - Hypertext Transfer Protocol (HTTP/1.1): Range Requests RFC7234 - HTTP/1.1: Caching - browser and intermediary caches   RFC 7234 - Hypertext Transfer Protocol (HTTP/1.1): Caching RFC7235 - HTTP/1.1: Authentication - a framework for HTTP authentication   RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication

"the more you know" :slight_smile:

If you’re going to do web development, you’re going to have to be familiar with the basics of HTTP, including status codes: I thought this code is for ruby related one instead of it’s from http standards. But thanks that make sense.

Colin,

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

I’ve assuming this code is something about Ruby itself instead of it’s from http standards. But thanks it’s make sense anyway.

“the more you know” :slight_smile:

Thanks for additional.

> "the more you know" :slight_smile:

Thanks for additional.

Here's a great site for these, and it includes the Rails "cheat codes" for each of them: http://httpstatus.es -- it even covers "I'm a teapot", which is apparently an RFC-blessed real code.

Walter

Yeah that’s useful. Thanks!