message=_("Your dashboard has been updated. You can %{web_ide_link_start}edit it here%{web_ide_link_end}.")%{web_ide_link_start: web_ide_link_start,web_ide_link_end: "</a>"}
throw(:error,error(_('There was an error updating the dashboard, branch name is invalid.'),:bad_request))unlessvalid_branch_name?
throw(:error,error(_('There was an error updating the dashboard, branch named: %{branch} already exists.')%{branch: params[:branch]},:bad_request))unlessnew_or_default_branch?
expect(response).toset_flash[:notice].toeq("Your dashboard has been updated. You can <a href=\"/-/ide/project/#{namespace.path}/#{project.name}/edit/#{branch_name}/-/.gitlab/dashboards/#{file_name}\">edit it here</a>.")
it_behaves_like'misconfigured dashboard service response',:bad_request,"There was an error updating the dashboard, branch named: existing_branch already exists."