forked from spgroup/rgms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alvaro
committed
Jul 27, 2014
1 parent
1f540b7
commit e913f21
Showing
6 changed files
with
79 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,6 @@ class MemberCreatePage extends Page { | |
def compareMemberCity(String city){ | ||
$("form").city ==~ /${city}/ | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ class MemberTestDataAndOperations { | |
|
||
//TODO member não tem username! | ||
static members = [ | ||
[name: "Rodolfo", username: "usernametest", email: "[email protected]", | ||
[name: "Rodolfo", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: true | ||
], | ||
[name: "Rebeca Souza", username: "rebecasouza", email: "[email protected]", | ||
[name: "Rebeca Souza", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: true | ||
], | ||
[name: "Rubens Lopes", username: "rlfs", email: "[email protected]", | ||
|
@@ -28,21 +28,20 @@ class MemberTestDataAndOperations { | |
//#if ($memberListAndPageImprovement) | ||
|
||
static newMembers = [ | ||
[name: "Rodolfo", username: "newUser1", email: "[email protected]", | ||
[name: "Rodolfo", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: false | ||
], | ||
[name: "Rebeca Souza", username: "newUser2", email: "[email protected]", | ||
[name: "Rebeca Souza", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: false | ||
], | ||
[name: "Rubens Lopes", username: "newUser3", email: "[email protected]", | ||
[name: "Rubens Lopes", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: false | ||
], | ||
[name: "Alvaro Joao", username: "ajsss", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: true | ||
[name: "Alvaro Joao", email: "[email protected]", | ||
status: "Graduate Student", university: "UFPE", enabled: false | ||
] | ||
] | ||
|
||
|
||
static public def sendEmailToMember(String username) { | ||
Member.sendEmail() | ||
} | ||
|
@@ -66,9 +65,9 @@ class MemberTestDataAndOperations { | |
|
||
//#end | ||
|
||
static public def findByUsername(String username) { | ||
static public def findByEmail(String email) { | ||
members.find { member -> | ||
member.username == username | ||
member.email == email | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package rgms | ||
|
||
import grails.test.mixin.TestFor | ||
import rgms.home.HomeController | ||
import spock.lang.Specification | ||
|
||
/** | ||
* See the API for {@link grails.test.mixin.web.ControllerUnitTestMixin} for usage instructions | ||
*/ | ||
@TestFor(HomeController) | ||
class HomeControllerSpec extends Specification { | ||
|
||
def setup() { | ||
} | ||
|
||
def cleanup() { | ||
} | ||
|
||
void "test something"() { | ||
} | ||
} |