History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-591
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Graeme Rocher
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

"out" not available to body closure in tag lib tests

Created: 12/Jan/07 09:37 AM   Updated: 31/Jan/07 03:38 AM
Component/s: None
Affects Version/s: 0.4
Fix Version/s: 0.4

Time Tracking:
Not Specified


 Description  « Hide
class NavTagLibTests extends GroovyTestCase {

	void testMessageTag() {
		def taglib = new NavTagLib()
		taglib.navigationService = [
			menuByName : [
				home: [ url:'homeurl', name:'homename', textlink:'hometext']
			]
		]
		// test when no message found it returns code
		def attrs = [item:"home"]	
		def result = taglib.navLink.call( attrs, { out << "HOME" } )		
		assertEquals "<a href='/homeurl' >HOME</a>", result
	}

}


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marc Palmer - 12/Jan/07 09:43 AM
Graeme: We need to change TagLibMetaClass to return the output when invoking other tags from other tags