def test_object_interface_model(fit_bias, freq):
    rand = np.random.RandomState(0)
    t = 10 * rand.rand(40)
    params = 10 * rand.rand(3)

    y = np.zeros_like(t)
    if fit_bias:
        y += params[0]
    y += params[1] * np.sin(2 * np.pi * freq * (t - params[2]))

    ls = LombScargle(t, y, center_data=False, fit_bias=fit_bias)
    y_fit = ls.model(t, freq)
    assert_allclose(y_fit, y)