Sha256: d2d5f7daf457657cf3e6f6439fbd35a5331c5ba2de4a411cd6a7ce3dd4bfa4c8

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

require 'test_helper'

class FormLegendTest < ActionController::TestCase
  tests PostsController

  setup do
    @p1 = Post.create!(subject: 'brabbel', body: 'Dies ist ein Test', user: 'wob', release: Date.today)
    @p2 = Post.create!(subject: 'fasel', body: 'Dies ist ein zweiter Test', user: 'wob', release: Date.today)
  end

  should "render group specific new form title" do
    get :new
    assert_select "div.row" do
      assert_select "div" do
        assert_select "legend", text: "Post/new"
      end
    end
  end

  should "render group specific update form title" do
    get :edit, params: { id: @p1 }
    assert_select "div.row" do
      assert_select "div" do
        assert_select "legend", text: "Post/edit"
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wobapphelpers-3.1.1 test/helpers/form_legend_test.rb
wobapphelpers-3.1.0 test/helpers/form_legend_test.rb