test: Fix use after free
test: Fix use after free

Noticed this while working on the unit test fixtures, so cleaned it up.

https://bugzilla.gnome.org/show_bug.cgi?id=742249

endlessm/gjs,endlessm/gjs,endlessm/gjs,endlessm/gjs,endlessm/gjs