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

40 views
Skip to first unread message

Masaaki Furuki

unread,
Jun 24, 2015, 1:23:50 PM6/24/15
to rubyonra...@googlegroups.com
What does "Expected response to be a <redirect>, but was <200>" means?

Colin Law

unread,
Jun 24, 2015, 1:38:07 PM6/24/15
to rubyonra...@googlegroups.com
On 24 June 2015 at 18:20, Masaaki Furuki <johnm...@gmail.com> wrote:
> What does "Expected response to be a <redirect>, 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

Masaaki Furuki

unread,
Jun 24, 2015, 2:16:14 PM6/24/15
to rubyonra...@googlegroups.com
Thanks Colin,

So can I response you like code 200? :)

Colin Law

unread,
Jun 24, 2015, 2:21:58 PM6/24/15
to rubyonra...@googlegroups.com
On 24 June 2015 at 19:16, Masaaki Furuki <johnm...@gmail.com> wrote:
> Thanks Colin,
>
> So can I response you like code 200? :)

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

>
> On Wednesday, June 24, 2015 at 10:38:07 AM UTC-7, Colin Law wrote:
>>
>> On 24 June 2015 at 18:20, Masaaki Furuki <johnm...@gmail.com> wrote:
>> > What does "Expected response to be a <redirect>, 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/b94026ca-bd98-4180-8163-ddc99fe52b38%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Masaaki Furuki

unread,
Jun 24, 2015, 2:39:24 PM6/24/15
to rubyonra...@googlegroups.com
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?

Scott Ribe

unread,
Jun 24, 2015, 2:57:54 PM6/24/15
to rubyonra...@googlegroups.com, Masaaki Furuki
On Jun 24, 2015, at 12:39 PM, Masaaki Furuki <johnm...@gmail.com> wrote:
>
> So do you mean code 200 stands for OK?

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>

--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





Colin Law

unread,
Jun 24, 2015, 2:58:11 PM6/24/15
to rubyonra...@googlegroups.com
On 24 June 2015 at 19:39, Masaaki Furuki <johnm...@gmail.com> wrote:
> 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

Hassan Schroeder

unread,
Jun 24, 2015, 3:03:07 PM6/24/15
to rubyonrails-talk
On Wed, Jun 24, 2015 at 11:57 AM, Scott Ribe
<scott...@elevated-dev.com> wrote:

> 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 :-)

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

though RFC 2616 is now superseded by:

RFC7230 - HTTP/1.1: Message Syntax and Routing - low-level message
parsing and connection management
http://tools.ietf.org/html/rfc7230
RFC7231 - HTTP/1.1: Semantics and Content - methods, status codes and headers
http://tools.ietf.org/html/rfc7231
RFC7232 - HTTP/1.1: Conditional Requests - e.g., If-Modified-Since
http://tools.ietf.org/html/rfc7232
RFC7233 - HTTP/1.1: Range Requests - getting partial content
http://tools.ietf.org/html/rfc7233
RFC7234 - HTTP/1.1: Caching - browser and intermediary caches
http://tools.ietf.org/html/rfc7234
RFC7235 - HTTP/1.1: Authentication - a framework for HTTP authentication
http://tools.ietf.org/html/rfc7235

"the more you know" :-)

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Masaaki Furuki

unread,
Jun 24, 2015, 3:16:52 PM6/24/15
to rubyonra...@googlegroups.com, johnm...@gmail.com
> 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.

Masaaki Furuki

unread,
Jun 24, 2015, 3:18:27 PM6/24/15
to rubyonra...@googlegroups.com
Colin,
I've assuming this code is something about Ruby itself instead of it's from http standards. But thanks it's make sense anyway.

Masaaki Furuki

unread,
Jun 24, 2015, 3:19:33 PM6/24/15
to rubyonra...@googlegroups.com
> "the more you know" :-) 

Thanks for additional.

Walter Lee Davis

unread,
Jun 24, 2015, 9:12:27 PM6/24/15
to rubyonra...@googlegroups.com

On Jun 24, 2015, at 3:19 PM, Masaaki Furuki <johnm...@gmail.com> wrote:

> > "the more you know" :-)
>
> 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
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/25a73f58-077f-4e07-b00e-1a9cd164d68b%40googlegroups.com.

Masaaki Furuki

unread,
Jun 24, 2015, 9:15:56 PM6/24/15
to rubyonra...@googlegroups.com
Yeah that's useful. Thanks!
Reply all
Reply to author
Forward
0 new messages