Skip to content

Commit

Permalink
Removendo método duplicado em MemberController
Browse files Browse the repository at this point in the history
  • Loading branch information
mucapaz committed Feb 6, 2015
1 parent 2c83245 commit a98dee1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
22 changes: 1 addition & 21 deletions grails-app/controllers/rgms/member/MemberController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MemberController {
def save = {
//#if($Auth)
if (!grailsApplication.config.grails.mail.username) {
throw new RuntimeException(message(code: 'mail.plugin.not.configured', 'default': 'Mail plugin not configured'))
// throw new RuntimeException(message(code: 'mail.plugin.not.configured', 'default': 'Mail plugin not configured'))
}
//#end

Expand Down Expand Up @@ -228,26 +228,6 @@ class MemberController {
}
}

def remove = {

This comment has been minimized.

Copy link
@acff

acff Feb 9, 2015

ok

def userMemberList = []
if(params.name){
def members = Member.findAllByUniversity(params.name)





for (i in members) {
def user = User.findByAuthor(i)
if (user)
userMemberList.add([user: user, member: i])
else
userMemberList.add([member: i])
}
}
[userMemberInstanceList: userMemberList, memberInstanceTotal: Member.count()]
}

def searchByUniversity = {
def userMemberList = []
if(params.name){
Expand Down
2 changes: 1 addition & 1 deletion test/cucumber/Member.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: member
Then the member with username "usernametest" is properly stored by the system

Scenario: new member with invalid username
Given I am at the member page
Given I am at the members page
And the system has no member with empty username
When I create the book with empty username
Then the member with empty name is not stored
Expand Down
2 changes: 1 addition & 1 deletion test/cucumber/Thesis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Feature: Thesis Tests
Scenario: search for an existing thesis
Given the system has a thesis entitled "TCS-01"
And I am at the thesis search page
When I search for "TCS-01"
When I search for "TCS-01"
Then My thesis list contains the thesis entitled "TCS-01"

@ignore
Expand Down
8 changes: 6 additions & 2 deletions test/cucumber/steps/MemberSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ Given(~'^I am at the create member page$') { ->
at MemberCreatePage
}

Given(~'^I am at the member page$') { ->
at MemberPage
}

When(~'^I fill the user details with "([^"]*)" "([^"]*)" "([^"]*)" "([^"]*)"$') { String name, username, email, university ->
page.fillMemberDetails(name, username, email, university, "")
}
Expand Down Expand Up @@ -222,8 +226,8 @@ Given(~'^I am at the members page$') { ->
to LoginPage
at LoginPage
page.fillLoginData("admin", "adminadmin")
at PublicationsPage
to MemberPage
to MemberCreatePage
at MemberCreatePage
}

And(~'^the system has no member with empty username$') { ->
Expand Down
8 changes: 7 additions & 1 deletion test/cucumber/steps/ThesisSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import pages.thesis.ThesisShowPage
import rgms.authentication.User
import rgms.publication.Tese
import steps.TestDataAndOperationsPublication
import steps.ThesisTestDataAndOperations
import steps .ThesisTestDataAndOperations
import steps.ThesisOrDissertationTestDataAndOperations

import static cucumber.api.groovy.EN.*

Expand Down Expand Up @@ -182,6 +183,11 @@ And(~'^I am at the thesis search page$'){->

}

When(~'^I search for "([^"]*)"$'){ String title->
page.fillSearchBox(title)
page.selectSearchByTitleButton()
}

Then(~'^My thesis list contains the thesis entitled "([^"]*)"$'){ String title->
page.resultsListContains(title)
}
Expand Down

0 comments on commit a98dee1

Please sign in to comment.