<commit_before>require 'rails_helper'

RSpec.describe "hq/pending_orphan_lists/upload.html.erb", type: :view do
  let(:partner) { FactoryGirl.build_stubbed :partner }

  before :each do
    assign :partner, partner
  end

  it 'shows Spredsheet upload form' do
    render

    expect(rendered).to have_selector("input[type='file']")
    expect(rendered).to have_selector("input[type='submit'][value='Upload']")
    expect(rendered).to have_link("Cancel")
  end

end<commit_msg>upload view should delegate to partials<commit_after>require 'rails_helper'

RSpec.describe "hq/pending_orphan_lists/upload.html.erb", type: :view do
  let(:partner) { FactoryGirl.build_stubbed :partner }

  before :each do
    assign :partner, partner
  end

  it 'should delegate to partials' do
    render

    expect(view).to render_template partial: 'layouts/_content_title'
    expect(view).to render_template partial: 'shared/_errors'
  end

  it 'shows Spredsheet upload form' do
    render

    expect(rendered).to have_selector("input[type='file']")
    expect(rendered).to have_selector("input[type='submit'][value='Upload']")
    expect(rendered).to have_link("Cancel", hq_partner_path(partner))
  end

end
{'fraction_non_alphanumeric': 0.12133891213389121, 'fraction_numerical': 0.0, 'mean_word_length': 5.010050251256281, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '365237', 'n_tokens_mistral': 400, 'n_tokens_neox': 383, 'n_words': 85}