Sha256: 099df67870010f1e5bd3836baf73ed2a5364ffe9e78656d6d2ec5224942b79ec

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'issue_comments/new', type: :view do
  let(:user) { FactoryBot.create(:user) }
  let(:project) { FactoryBot.create(:project, owner: user) }
  let(:issue) { FactoryBot.create(:issue, project: project, creator: user) }
  let(:issue_comment) { FactoryBot.build(:issue_comment, issue: issue, user: user) }
  before(:each) do
    assign(:issue_comment, issue_comment)
  end

  it 'renders new issue_comment form' do
    render

    assert_select 'form[action=?][method=?]', issue_comments_path, 'post' do
      assert_select 'input#issue_comment_id[name=?]', 'issue_comment[id]'
      assert_select 'select#issue_comment_issue_id[name=?]', 'issue_comment[issue_id]'
      assert_select 'select#issue_comment_user_id[name=?]', 'issue_comment[user_id]'
      assert_select 'textarea#issue_comment_description[name=?]', 'issue_comment[description]'
    end
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
model_base_generators-0.4.0 examples/rails-5.0/spec/views/issue_comments/new.html.erb_spec.rb
model_base_generators-0.4.0 examples/rails-5.1/spec/views/issue_comments/new.html.erb_spec.rb