# Unit Testing not working for some controllers

**URL:** <https://www.ruby-forum.com/t/unit-testing-not-working-for-some-controllers/106798>\
**Category:** Rails\
**Created:** [June 14, 2007, 8:20am UTC](https://www.ruby-forum.com/t/unit-testing-not-working-for-some-controllers/106798 "2007-06-14T08:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazzybuddy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f4b2a3/32.png) [@jazzybuddy](https://www.ruby-forum.com/u/jazzybuddy)\
**Post date:** [June 14, 2007, 8:20am UTC](https://www.ruby-forum.com/t/unit-testing-not-working-for-some-controllers/106798/1 "2007-06-14T08:20:48Z")

</div>

Hai all,  
I am trying to unit test all my controllers (functional testing).  
All the actions in controllers which are accessed directly from the  
browser are working properly (i.e., the parameters I am passing from the  
test case are getting accessed with “params[:mmm]”).

But some actions in controllers which are called through ajax calls are  
not working properly. i.e., the parametsrs are not getting passed to  
that action in that controller, they are NIL.

Can somebody tel me what can be the problem???

THNX in advance.  
Jazzy B…

---

<div class="post-metadata">

**Author:** ![jazzybuddy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f4b2a3/32.png) [@jazzybuddy](https://www.ruby-forum.com/u/jazzybuddy)\
**Post date:** [June 14, 2007, 8:47am UTC](https://www.ruby-forum.com/t/unit-testing-not-working-for-some-controllers/106798/2 "2007-06-14T08:47:38Z")

</div>

There is not enough information here. Since ajax calls to controllers  
with params do work, there must be something in how you are invoking  
them in your test that is the issue. I suggest posting a short sample  
of the test code that is failing and the action it is invoking.

Michael

On Jun 13, 11:20 pm, Jazzy B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
