Sha256: 3894b8a70b6e94af92a7da3be1ce6836a8066b4835003edcdb93b3b61f22dff5

Contents?: true

Size: 878 Bytes

Versions: 3

Compression:

Stored size: 878 Bytes

Contents

require 'rails_helper'

describe "resource_import_results/index" do
  fixtures :all

  before(:each) do
    assign(:resource_import_results, ResourceImportResult.page(1))
    admin = User.find('enjuadmin')
    view.stub(:current_resource).and_return(admin)
  end

  it "renders a list of resource_import_results" do
    render
    expect(rendered).to match /MyString/
  end

  context "with @resource_import_file" do
    before(:each) do
      @resource_import_file = ResourceImportFile.find(1)
      @resource_import_results = ResourceImportResult.where(resource_import_file_id: 1).page(1)
    end
    it "renders a list of resource_import_results for the resource_import_file" do
      render
      expect(view).to render_template "resource_import_results/_list_lines"
      expect(rendered).to match /MyString/
      expect(rendered).to match /<td>1<\/td>/
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.0/spec/views/resource_import_results/index.html.erb_spec.rb
enju_biblio-0.2.0 spec/views/resource_import_results/index.html.erb_spec.rb
enju_biblio-0.2.0.beta.4 spec/views/resource_import_results/index.html.erb_spec.rb