Sha256: 9c1eb343169a5878fbc1c9069da14bd9e1a9a6b442ebd49f38367d9ac5c1ac4a
Contents?: true
Size: 667 Bytes
Versions: 3
Compression:
Stored size: 667 Bytes
Contents
require 'rails_helper' module Theblog RSpec.describe ContentNodesController, :type => :controller do routes { Theblog::Engine.routes } describe "GET show" do it "should find node by slug" do category_posts = double(:category_posts) expect(Theblog::ContentNode).to receive(:by_parent).with("test_category").and_return(category_posts) expect(category_posts).to receive(:find_by).with(slug: "test_post").and_return(double(:post)) get :show, category: "test_category", slug: "test_post" expect(response).to have_http_status(:success) expect(response).to render_template(:show) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems