I used titlesec for customizing chapter titles. How can I put the Table of contents title above the horizontal line?

(I am trying to customize the place of the title, not the title) Added figure is the result I get, from my existing code.

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\bfseries\large}
{\filleft\MakeUppercase{\chaptertitlename} \large\thechapter}
{2ex}
{\titlerule
\vspace{2ex}%
\filleft}
\titlespacing*{\chapter}{0pt}{120pt}{6pt}


With your current settings, The rule is placed above the chapter title and below the string "Chapter #", for numbered chapters. You need a different specification for unnumbered chapters (such as the ToC), to make the rule appear below the title; this can be achieved using another \titleformat command with the numberless key:

\documentclass{book}
\usepackage{titlesec}

\titleformat{\chapter}[display]
{\bfseries\large}
{\filleft\MakeUppercase{\chaptertitlename} \large\thechapter}
{2ex}
{\titlerule\vspace{2ex}\filleft}
\titleformat{name=\chapter,numberless}[display]
{\bfseries\large}
{\titlerule}
{-7ex}
{\filleft\MakeUppercase}[\vspace{5ex}]
\titlespacing*{\chapter}{0pt}{120pt}{6pt}

\begin{document}

\tableofcontents
\chapter{Test chapter}

\end{document}


An image of the ToC:

An image of a numbered chapter: