Add qunit test for profiles [MJ-172]

All tests pass.