Rails API Code Test