Testing Angular curl functionality with rails app