Reputation:
The below rspec test is not passing, I'm not sure what I'm doing wrong. It routes fine in the browser, but the test is not passing.
require 'spec_helper'
describe QueueVideosController do
describe "GET show" do
context "with authenticated users" do
it "routes /queue to the QueueVideos controller" do
expect(get("/queue")).to route_to("queue_videos#show")
end
end
end
end
From my controller:
class QueueVideosController < ApplicationController
def show
end
end
From my routes file:
get '/queue' => 'queue_videos#show'
Upvotes: 0
Views: 33
Reputation: 1318
Try using a different syntax:
expect(get: "/queue").to route_to(
controller: "queue_videos",
action: "show"
)
Upvotes: 1