tests for joinmodel