Displaying 20 results from an estimated 900 matches similar to: "Can't follow redirects outside current controller - but it's the same controller"
2007 Apr 29
0
integration test redirects to external URLs
In an integration test that I am writing I want to do something like
def test_my_page
get "/rails/someaction"
assert_response :redirect
follow_redirect!
assert_url => ''http://www.somepageoutsidemyrailsapp''
end
Is there any way to do something like ''assert_url'' and see if I was
redirected to a page outside of the rails
2005 Dec 23
6
Agile book - test error
Hi all,
I get an error when testing the "store_controller_test.rb"
The troublesome line is in the test below:
def test_add_to_cart
get :add_to_cart, :id => @version_control_book.id <<<
cart = session[:cart]
assert_equal @version_control_book.price, cart.total_price
assert_redirected_to :action => ''display_cart''
follow_redirect
2006 Sep 03
1
Returning different values with stubs
Right now I''m working on adding tests to a method that looks like this:
def get_via_redirect(path, args={})
get path, args
follow_redirect! while redirect?
status
end
So, I want to confirm that get is called and that status is returned
but I also want to see that when the value of redirect? effects how
many times follow_redirect is called. Is there
2007 Nov 28
2
follow_redirect!() doesn't exist?
Hi all
I want to do some functional testing. I stumbled over the method
follow_redirect!() somewhere, but evidently this doesn''t seem to exist
in my Rails version (1.2.5 or so)?! Then I tried follow_redirect()
(without the exclamation mark), and I get the following error:
TypeError: can''t convert Symbol into String
What am I doing wrong? Thanks for help :-)
Josh
--
Posted via
2007 Jan 31
1
help please!
Hi,
I''ll appreciate insight on this one... it''s causing me some pain on my
production env.
<%= link_to "something",
:controller => "somecontroller",
:action => ''someaction'',
:id => someid,
:favorite => is_a_favorite %>
I added a boolean :favorite to the URL arguments.
THis has always worked well under my dev
2006 Apr 03
0
follow_redirect! aborts rake during integration tests
I''m running integration tests on Rails 1.1/Ruby 1.8.4/Windows XP and have
found that any call to follow_redirect! (directly or through
[get|post]_via_redirect) causes rake to abort (see command line output
below). Has anyone else seen this error, or know what might be the trouble?
Thanks!
Tom
C:\dev\h2h>rake test:integration --trace
(in C:/dev/h2h)
** Invoke test:integration
2006 Mar 18
2
Additional link tag attributes with link_to_function...
Hi,
I''m having a bit of a struggle with link_to_remote. Everything works
exactly as I want it, but the problem is that I want to add another
attribute to the <a>-tag, namely class="". Long story short, I want
specific links to look differently from others, but all of them being
link_to_function. Normally, I''d do this with adding a class="foo" to
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a
test that sees if a controller redirects to the correct place and
preserves the query string.
Here?s the code:
class LoginRedirectTest < ActionController::IntegrationTest
def test_non_admin_auth
request_uri = "/datafeed/event/report?blah=blah"
get(request_uri)
follow_redirect!
2007 Jul 25
3
autotest + integration testing (follow_redirect!) error
I''ve got an interesting (possibly) problem right now between autotest
and rails integration tests. There are a few things to preface this
with.
Works fine:
rake test
rake test:integration
Blows up:
autotest
Autotest is correctly determining rails and runs tests just fine. One
part of the behavior is that if I save a change in just the
integration test (even hitting cmd+s to trigger a
2006 Apr 28
4
can someone help DRY a noob? thanks...
hi all
i''m trying to pass a variable name right round the block and need a hand
to ease my aching brain.
##in my sidebar i have
<li><%= SidebarItem(''catalogue'') %></li>
<li><%= SidebarItem(''provenance'') %></li>
<li><%= SidebarItem(''status'') %></li>
##linked to a
2006 Jun 17
3
What is this failure trying to tell me?
Here is my unit test code.
post :login, :user=>{ :login => "bob", :password => "test"}
assert_response :redirect
assert_session_has :user
assert_redirected_to :action => ''welcome''
Here is the failure I''m getting when I run my tests.
2) Failure:
test_login_required(UserControllerTest)
2008 Oct 10
16
rspec - undefined method `describe'' for main:Object
When i run a spec file i am getting the following error
D:\Diwakar\spec_diwa\spec\controllers>spec sandbox_controller_spec.rb
c:/ruby/lib/ruby/gems/1.8/gems/rspec-0.5.15/lib/spec/api/sugar.rb:17:in
`method_
missing'': undefined method `describe'' for main:Object (NoMethodError)
from ./sandbox_controller_spec.rb:7
from
2008 Sep 03
1
Dovecot 1.1.3 Kerberos5 GSSAPI bug (with patch)
The functionality added in changeset 818a638fa9a3 has a bug for x86_64 on line
103. The src/auth/mech-gssapi.c file must now include stdlib.h to have the
declaration for getenv(). Otherwise, the compiler uses the implicit return type
(int), which truncates the 8-byte pointer getenv() returns to a 4-byte value.
This causes a segfault on subsequent reads. Here is debugger output
illustrating the
2019 Dec 28
3
Settable minimum RSA key sizes on the client end for legacy devices.
Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
- Doug Gwyn, in Introducing Regular Expressions (2012) by Michael Fitzgerald
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: openssh-unix-dev <openssh-unix-dev-bounces+j.mccanta=f5.com at mindrot.org> on behalf of Steve Sether
2008 Apr 29
1
Spec''ing controller macros
Hi,
(This is my first post after months of appreciative lurking...)
I''m trying to spec the following conditional controller macro:
class ApplicationController < ActionController::Base
# turn off session management for robots
session :off, :if => lambda {|req| req.user_agent =~ /(Google|Slurp)/i }
# ...
end
My current attempt seems to be quite unsuccessful:
1) when I
2008 May 07
0
Temporary failure in name resolution
I am installing for the first time on RHEL4 and I am getting an error
running puppetmasterd:
# service puppetmaster start
Starting puppetmaster: Could not start WEBrick: getnameinfo: Temporary
failure in name resolution
[FAILED]
Where is puppetmaster looking for hosts information. The FQDN of the server
is set in its hosts file.
thanks
Gwyn
2004 Feb 18
1
Location of SID in Samba 2.2.7a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm guessing /etc/samba/secrets.tdb but I'm not 100% sure.
I'm trying to troubleshoot a problem where a samba server is replaced and
WinXP boxes do not accept the new server. I'm inclined to beleive this is
caused by the SID being different.
These servers do not appear to have a MACHINE.SID file on them, my research
into the topic
2006 May 26
2
question about coding
John Miles wrote:
> You'll definitely have to encode in little-endian form. PCM audio is always
> little-endian, to the best of my knowledge. I have never seen any
> big-endian audio data files.
Try AIFF, AU and IFF just for starters. They are definietly not the
only ones.
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
2007 May 03
0
[patch] Mac Universal Binaries
Peter Grayson wrote:
> It is not that AC_C_BIGENDIAN does not work. It is that it determines
> endianness at configure-time as opposed to compile-time. The process
> for building universal binaries on Mac demands that the distinction be
> made at compile-time. To enable building universal binaries on Mac in
> a single pass, the decision has to be deferred to compile-time.
1997 Dec 30
0
Weird problem with smb 1.9.17p4 and p5
Overall environment is SunOS and Solaris 2.X machines running a mixture of
smb.1.9.17.p4 and p5.
This machine is a SunOS 4.1.3_U1 running smb.1.9.17p5. (debug level 3)
AAAA is Primary Domain Controller (NT4.0) 206.63.206.24
zotz is Win95 machine
>From smb.conf:
security = server
password server = aaaa
>From log.zotz:
[snip]
Connecting to 206.63.206.24 at port 139
connected to password