# Integration testing

**URL:** <https://www.ruby-forum.com/t/integration-testing/181460>\
**Category:** Ruby\
**Created:** [January 12, 2010, 11:13am UTC](https://www.ruby-forum.com/t/integration-testing/181460 "2010-01-12T11:13:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 12, 2010, 11:13am UTC](https://www.ruby-forum.com/t/integration-testing/181460/1 "2010-01-12T11:13:40Z")

</div>

Hi Champs,

In urgent need of you people … 🙂 Actually i am writing integration  
tests for my application. I am checking out that -

- Are all the pages accessible to admin by creating a session ?
- The same way are the same pages are not accessible to normal user?

I have defined a module and running a simple get request to it as like

def test\_access\_pages\_admin  
get “employees”  
assert\_response :success  
assert\_template “employees/login\_page”  
end

But i am getting error over here. Error is-  
“ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your  
SQL syntax; check the manual that corresponds to your MySQL server  
version for the right syntax to use near ‘RELEASE SAVEPOINT  
active\_record\_1’ at line 1: RELEASE SAVEPOINT active\_record\_1”

Can someone light me the right direction. Waiting for every possible  
answer.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 12, 2010, 2:10pm UTC](https://www.ruby-forum.com/t/integration-testing/181460/2 "2010-01-12T14:10:38Z")

</div>

On Tue, Jan 12, 2010 at 10:13 AM, Hemant B. \<  
removed\_email\_address@domain.invalid\> wrote:

> Hi Champs,
> 
> In urgent need of you people … 🙂 Actually i am writing integration  
> tests for my application. I am checking out that -
> 
> - Are all the pages accessible to admin by creating a session ?
> - The same way are the same pages are not accessible to normal user?

I am assuming you are using Rails? You might wish to direct your query  
on  
the Rails list.  
In addition you will probably need to supply more illustrative code  
snippets, in particular  
of your configuration and environment sections.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 12, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/integration-testing/181460/3 "2010-01-12T14:13:30Z")

</div>

Hemant B. wrote:

> I have defined a module and running a simple get request to it as like
> 
> def test\_access\_pages\_admin  
> get “employees”  
> assert\_response :success  
> assert\_template “employees/login\_page”  
> end

That looks like Rails code. Please ask your question on a Rails mailing  
list. Rails is not Ruby; it just happens to be written _in_ Ruby.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 12, 2010, 2:15pm UTC](https://www.ruby-forum.com/t/integration-testing/181460/4 "2010-01-12T14:15:36Z")

</div>

Ohh …  
M sorry … 🙂

Brian C. wrote:

> Hemant B. wrote:
> 
> > I have defined a module and running a simple get request to it as like
> > 
> > def test\_access\_pages\_admin  
> > get “employees”  
> > assert\_response :success  
> > assert\_template “employees/login\_page”  
> > end
> 
> That looks like Rails code. Please ask your question on a Rails mailing  
> list. Rails is not Ruby; it just happens to be written _in_ Ruby.
