Index: branches/features/purchaseOrders/application.properties
===================================================================
--- branches/features/purchaseOrders/application.properties	(revision 898)
+++ branches/features/purchaseOrders/application.properties	(revision 901)
@@ -1,4 +1,4 @@
 #Grails Metadata file
-#Tue Mar 22 15:05:37 EST 2011
+#Tue Apr 26 07:59:16 EST 2011
 app.grails.version=1.3.7
 app.name=gnuMims
Index: branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy
===================================================================
--- branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy	(revision 898)
+++ branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy	(revision 901)
@@ -1,5 +1,5 @@
 grails.project.class.dir = "target/classes"
 grails.project.test.class.dir = "target/test-classes"
-grails.project.test.reports.dir	= "target/test-reports"
+grails.project.test.reports.dir = "target/test-reports"
 
 def env = System.getProperty('grails.env')
@@ -8,11 +8,11 @@
     case "production":
         //grails.project.war.file = "target/${appName}-${appVersion}.war"
-        grails.project.war.file="target/${appName}Live.war"
+        grails.project.war.file = "target/${appName}Live.war"
         break
     case "development":
-        grails.project.war.file="target/${appName}Dev.war"
+        grails.project.war.file = "target/${appName}Dev.war"
         break
     default:
-        grails.project.war.file="target/${appName}.war"
+        grails.project.war.file = "target/${appName}.war"
         break
 }
@@ -34,5 +34,5 @@
 
     // inherit Grails' default dependencies
-    inherits( "global" ) {
+    inherits("global") {
         // uncomment to disable ehcache
         // excludes 'ehcache'
@@ -50,4 +50,5 @@
         //mavenLocal()
         mavenCentral()
+        mavenRepo "https://nexus.codehaus.org/content/repositories/snapshots"
         //mavenRepo "http://snapshots.repository.codehaus.org"
         //mavenRepo "http://repository.codehaus.org"
@@ -61,15 +62,22 @@
         runtime 'mysql:mysql-connector-java:5.1.9'
 
-        runtime ('org.apache.poi:poi:3.5-FINAL') {
+        runtime('org.apache.poi:poi:3.5-FINAL') {
             excludes 'servlet-api', 'commons-logging', 'log4j'
         }
 
-        runtime ('net.sf.jasperreports:jasperreports:3.7.2') {
+        runtime('net.sf.jasperreports:jasperreports:3.7.2') {
             excludes 'xml-apis'
         }
 
-        runtime ('org.apache.ant:ant:1.7.1')
-        runtime ('org.apache.ant:ant-launcher:1.7.1')
+        runtime('org.apache.ant:ant:1.7.1')
+        runtime('org.apache.ant:ant-launcher:1.7.1')
 
+        test("org.seleniumhq.selenium:selenium-htmlunit-driver:latest.release") {
+            excludes 'xml-apis'
+        }
+    }
+    plugins {
+        test ":geb:0.6-SNAPSHOT"
+        test ":spock:0.5-groovy-1.7"
     }
 
Index: branches/features/purchaseOrders/grails-app/conf/Config.groovy
===================================================================
--- branches/features/purchaseOrders/grails-app/conf/Config.groovy	(revision 898)
+++ branches/features/purchaseOrders/grails-app/conf/Config.groovy	(revision 901)
@@ -11,4 +11,5 @@
 // }
 
+grails.app.context=/gnumims/
 // Set false due to acegi security issue.
 // See: http://jira.grails.org/browse/GPACEGI-41
Index: branches/features/purchaseOrders/test/functional/gnumims/functional/LoginTests.groovy
===================================================================
--- branches/features/purchaseOrders/test/functional/gnumims/functional/LoginTests.groovy	(revision 901)
+++ branches/features/purchaseOrders/test/functional/gnumims/functional/LoginTests.groovy	(revision 901)
@@ -0,0 +1,52 @@
+package gnumims.functional
+
+import grails.plugin.geb.GebSpec
+import gnumims.functional.pages.LoginPage
+import geb.spock.GebReportingSpec
+import geb.Browser
+import geb.junit3.GebTest
+import gnumims.functional.pages.HomePage
+import spock.lang.Stepwise
+
+@Stepwise
+class LoginTests extends GebReportingSpec {
+    String getBaseUrl() { "http://localhost:8080/gnumims" }
+    File getReportDir() { new File("target/reports/geb") }
+
+    def "We start at the login page"() {
+        when:
+        go getBaseUrl()
+
+        then:
+        $("h1").text() == "Welcome to gnuMims please log in"
+    }
+
+    def "When we click login we go to the home page"() {
+        when:
+        to LoginPage
+        login.click(HomePage)
+
+        then:
+        at(HomePage)
+    }
+
+    def "When we click logout, we go back to the login page"() {
+        when:
+        to HomePage
+        logout.click()
+
+        then:
+        at(LoginPage)
+    }
+
+    def "If we type in the wrong password"() {
+        when:
+        to LoginPage
+        form.j_password = "bogus"
+        login.click(LoginPage)
+
+        then:
+        $("div.login_message").text() == "[manager] wrong username/password."
+    }
+
+}
