Sha256: 2aa5d8ef71d244c2f2fcc570889bce564a14094902bbda4394bdd4854797398b
Contents?: true
Size: 638 Bytes
Versions: 8
Compression:
Stored size: 638 Bytes
Contents
describe PagesController, type: :controller do let(:page_name) { "about_page" } context "content exists" do describe "GET #show" do let(:page) { ContentBlock.create!(name: page_name, value: "foo bar") } it "updates the node" do get :show, id: page.name expect(response).to be_successful expect(assigns[:page]).to eq page end end end context "content does not exist" do describe "GET #show" do it "creates the node" do get :show, id: "about_page" expect(response).to be_successful expect(assigns[:page]).not_to be_nil end end end end
Version data entries
8 entries across 8 versions & 1 rubygems