Write tests for & define ::update_resource method