High Court judges are expected to deliver their ruling in the case on Monday.
In an investigation into Ms Patel’s behaviour, published in November last year, Sir Alex Allan found she had not always treated civil servants with “consideration and respect”.
He concluded: “Her approach on occasions has amounted to behaviour that can be described as bullying in terms of the impact felt by individuals. To that extent her behaviour has been in breach of the ministerial code, even if unintentionally.”
Mr Johnson, the arbiter of the ministerial code, said the Home Secretary was “unaware” of the impact she had and he was “reassured” she was “sorry for inadvertently upsetting those with whom she was working”.
After “weighing up all the factors”, he concluded the code had not been breached.
But at a hearing last month, lawyers for the FDA, which represents senior public servants, argued Mr Johnson “misinterpreted” the term “bullying” in the ministerial code when deciding if Ms Patel’s treatment of civil servants breached its standards.
They alleged he made a “misdirection of law” in reaching his decision.
Lawyers for Mr Johnson argued that the FDA’s claim was “not justiciable” and that there had been “no error of law”
They said the ministerial code “does not create or impose any legal duties on ministers or the Prime Minister”, is “not required by law” and its contents “not regulated by law”.
The code was a “political document” and “not about protecting the rights of civil servants” who still have access “to all the employment law rights”, the Prime Minister’s lawyer argued.
Sir Alex left his role in Downing Street after Mr Johnson contradicted his advice.
Following the publication of his report, Ms Patel issued an “unreserved, fulsome apology” and said there were “no excuses” for what happened.
Lord Justice Lewis and Mrs Justice Steyn are due to hand down their judgment on Monday morning.