Sha256: 933c755884b2587e2b5d45a6a50f51f434eef2b013a1b9d6647c64eb6cf7c4aa

Contents?: true

Size: 956 Bytes

Versions: 3

Compression:

Stored size: 956 Bytes

Contents

# frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'attached_files/edit', type: :view do
  let(:user) { FactoryGirl.create(:user) }
  let(:project) { FactoryGirl.create(:project, owner: user) }
  let(:issue) { FactoryGirl.create(:issue, project: project, creator: user) }
  let(:issue_comment) { FactoryGirl.create(:issue_comment, issue: issue, user: user) }
  let(:attached_file) { FactoryGirl.create(:attached_file, issue_comment: issue_comment) }
  before(:each) do
    assign(:attached_file, attached_file)
  end

  it 'renders the edit attached_file form' do
    render

    assert_select 'form[action=?][method=?]', attached_file_path(attached_file), 'post' do
      assert_select 'input#attached_file_id[name=?]', 'attached_file[id]'
      assert_select 'select#attached_file_issue_comment_id[name=?]', 'attached_file[issue_comment_id]'
      assert_select 'input#attached_file_url[name=?]', 'attached_file[url]'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
model_base_generators-0.3.9 example/spec/views/attached_files/edit.html.erb_spec.rb
model_base_generators-0.3.8 example/spec/views/attached_files/edit.html.erb_spec.rb
model_base_generators-0.3.7 example/spec/views/attached_files/edit.html.erb_spec.rb