Fork me on GitHub
#re-frame
<
2018-01-03
>
mikethompson05:01:19

@bfast so you would be doing something like this:

(deftest my-test 
  (re-frame-test/run-test-sync

    ;;  mock it out
    (re-frame/reg-fx   
      :http-xhrio   
      (fn [val]  ))         ;;  maybe reset an atom in here, capturing val. Then later check it is correct

    (re-frame/dispatch [:something])
     ... ))

osvalds08:01:43

Has anyone had any insights on adding CSRF tokens to a re-frame application. Like what are the best practices, what to avoid, good blog posts about this.

Keith11:01:57

He basically uses a placeholder in the home.html template and replaces the value with a valid CSRF token with a Ring middleware