@@ -338,12 +338,20 @@ test('link-to', () => {
338338 let input = `
339339 {{#link-to "about"}}About Us{{/link-to}}
340340 {{#link-to this.dynamicRoute}}About Us{{/link-to}}
341+ {{#link-to "user" this.first this.second}}Show{{/link-to}}
342+ {{#link-to "user" this.first this.second (query-params foo="baz")}}Show{{/link-to}}
343+ {{#link-to "user" this.first}}Show{{/link-to}}
344+ {{#link-to "user" this.first (query-params foo="baz")}}Show{{/link-to}}
341345 ` ;
342346
343347 expect ( runTest ( 'link-to.hbs' , input ) ) . toMatchInlineSnapshot ( `
344348 "
345349 <LinkTo @route=\\"about\\">About Us</LinkTo>
346350 <LinkTo @route={{this.dynamicRoute}}>About Us</LinkTo>
351+ <LinkTo @route=\\"user\\" @models={{array this.first this.second}}>Show</LinkTo>
352+ <LinkTo @route=\\"user\\" @models={{array this.first this.second}} @query={{hash foo=\\"baz\\"}}>Show</LinkTo>
353+ <LinkTo @route=\\"user\\" @model={{this.first}}>Show</LinkTo>
354+ <LinkTo @route=\\"user\\" @model={{this.first}} @query={{hash foo=\\"baz\\"}}>Show</LinkTo>
347355 "
348356 ` ) ;
349357} ) ;
@@ -374,6 +382,11 @@ test('link-to-inline', () => {
374382 class="t__em-link"
375383 }}
376384 {{link-to (t "show") "flight" event.flight.id class="btn btn-default btn-sm pull-right"}}
385+ {{link-to (t "show") "user" (if linkActor event.actor.id event.user.id)}}
386+ {{link-to "Show" "user" this.first this.second}}
387+ {{link-to "Show" "user" this.first this.second (query-params foo="baz")}}
388+ {{link-to "Show" "user" this.first}}
389+ {{link-to "Show" "user" this.first (query-params foo="baz")}}
377390 ` ;
378391
379392 /**
@@ -388,6 +401,11 @@ test('link-to-inline', () => {
388401 <LinkTo @route={{this.dynamicPath}} class=\\"tabs__discrete-tab\\" @activeClass=\\"o__selected\\" @current-when=\\"apps.segments\\" data-test-segment-link=\\"segments\\">Segments</LinkTo>
389402 <LinkTo @route=\\"apps.app.companies.segments.segment\\" @model={{segment}} class=\\"t__em-link\\">{{segment.name}}</LinkTo>
390403 <LinkTo @route=\\"flight\\" @model={{event.flight.id}} class=\\"btn btn-default btn-sm pull-right\\">{{t \\"show\\"}}</LinkTo>
404+ <LinkTo @route=\\"user\\" @model={{if linkActor event.actor.id event.user.id}}>{{t \\"show\\"}}</LinkTo>
405+ <LinkTo @route=\\"user\\" @models={{array this.first this.second}}>Show</LinkTo>
406+ <LinkTo @route=\\"user\\" @models={{array this.first this.second}} @query={{hash foo=\\"baz\\"}}>Show</LinkTo>
407+ <LinkTo @route=\\"user\\" @model={{this.first}}>Show</LinkTo>
408+ <LinkTo @route=\\"user\\" @model={{this.first}} @query={{hash foo=\\"baz\\"}}>Show</LinkTo>
391409 "
392410 ` ) ;
393411} ) ;
0 commit comments