fcf.module({
  name: "fcf:tests/NFSQL/DB.InsertJoin.js",
  dependencies: ["fcf:NTest/uniTest.js", "fcf:tests/NFSQL/Helpers/Helper.js"],
  module: function(uniTest, Helper) {
    uniTest.add("FSQL DB" , "DB Insert Join", function(a_tester) {

      var insertId = -1;
      
      Helper.query(a_tester, { query: "DELETE FROM fcftest_single_types_joininsert" });
      Helper.query(a_tester, { query: "DELETE FROM fcftest_single_types_joininsert_slave" });
      Helper.query(a_tester, { query: "DELETE FROM fcftest_single_types_joininsert_master" });
      Helper.query(
        a_tester,
        { query: "INSERT INTO fcftest_single_types_joininsert (str, slave_str, master_str) VALUES (${1}, ${2}, ${3})",
          args: ["test", "join_text", "master_text"],
        }
      );
      Helper.query(
        a_tester,
        { query: "SELECT str, slave_str, master_str FROM fcftest_single_types_joininsert",
          args: [],
        },
        function(a_result){
          delete a_result[0][0]["@key"];
          uniTest.equal(a_result, [[{ "str": "test", "slave_str": "join_text", "master_str": "master_text" } ]]);
        }
      );
    });
  }
});
