-
Notifications
You must be signed in to change notification settings - Fork 77
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
Showing
10 changed files
with
53 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ import pages.PublicationsPage | |
import pages.RootPage | ||
import pages.UnauthorizedPage | ||
import pages.UserRegisterPage | ||
import rgms.authentication.User | ||
import rgms.publication.Periodico | ||
import rgms.member.Member | ||
import rgms.member.MemberController | ||
|
@@ -96,13 +97,16 @@ Then(~'A message indicating the user was successfully registered is displayed'){ | |
|
||
|
||
Given (~'The user of "([^"]*)" username is not yet enabled') { username -> | ||
Member usuarioNaoHabilitado = Member.findByUsername("naoHabilitado") | ||
User usuarioNaoHabilitado = User.findByUsername("naoHabilitado") | ||
if (!usuarioNaoHabilitado){ | ||
usuarioNaoHabilitado = new Member(name:"Usuario Nao Habilitado",username: 'naoHabilitado', passwordHash: new Sha256Hash("senha").toHex(), | ||
email:"[email protected]", status:"Graduate Student", enabled:false, university:"UFPE") | ||
usuarioNaoHabilitado = new User(username: 'naoHabilitado', passwordHash: new Sha256Hash("senha").toHex(), enabled:false) | ||
def author = new Member(name:"Usuario Nao Habilitado", email:"[email protected]", status:"Graduate Student", university:"UFPE") | ||
author.save() | ||
usuarioNaoHabilitado.author = author; | ||
usuarioNaoHabilitado.save() | ||
|
||
} | ||
def user = Member.findByUsername(username) | ||
def user = User.findByUsername(username) | ||
assert( !user?.enabled ) | ||
} | ||
|
||
|
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
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
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