Sha256: e450d23cd4c854f1e066721a3e2bc6171b1f76a8552a95c97da41baa1f66faa2

Contents?: true

Size: 710 Bytes

Versions: 6

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'phases/edit', type: :view do
  let(:user) { FactoryGirl.create(:user) }
  let(:project) { FactoryGirl.create(:project, owner: user) }
  let(:phase) { FactoryGirl.create(:phase, project: project) }
  before(:each) do
    assign(:phase, phase)
  end

  it 'renders the edit phase form' do
    render

    assert_select 'form[action=?][method=?]', phase_path(phase), 'post' do
      assert_select 'select#phase_project_id[name=?]', 'phase[project_id]'
      assert_select 'input#phase_name[name=?]', 'phase[name]'
      assert_select_datetime_field :phase, :started_at
      assert_select_datetime_field :phase, :finished_at
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
model_base_generators-0.3.9 example/spec/views/phases/edit.html.erb_spec.rb
model_base_generators-0.3.8 example/spec/views/phases/edit.html.erb_spec.rb
model_base_generators-0.3.7 example/spec/views/phases/edit.html.erb_spec.rb
model_base_generators-0.3.6 example/spec/views/phases/edit.html.erb_spec.rb
model_base_generators-0.3.5 example/spec/views/phases/edit.html.erb_spec.rb
model_base_generators-0.3.4 example/spec/views/phases/edit.html.erb_spec.rb