(1) The filing of the petition and publication and posting of the notice as provided in section 7-1306, Idaho Code, shall be sufficient to give the court jurisdiction, and upon hearing the court shall examine into and determine all matters and things affecting each question submitted, shall make such findings with reference thereto and render such judgment and decree thereon as the case warrants.
(2)  In making the findings set forth in subsection (1) of this section, the court shall find upon what legal authority the political subdivision bases the petition for the proposed bond, obligation or agreement and whether such bond, obligation or agreement is permissible under the general laws of the state or is permissible as an ordinary and necessary expense of the political subdivision authorized by the general laws of the state and shall determine if the political subdivision is entitled to the relief sought. If in order to enable the court to enter judgment or to carry it into effect, it is necessary to take an account or to establish the truth of any averment by evidence or make an investigation of any other matter, the court may conduct such hearings or order such references as it deems necessary and proper.