Sha256: eb928f0782cf67396061e7dcfd4f3e884f73d3de0557dc8bf16f9c781ee38f59

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

require 'spec_helper'

describe "resource_import_files/show" do
  fixtures :all

  before(:each) do
    file = resource_import_files(:resource_import_file_00001)
    assign(:resource_import_file, file)
    assign(:resource_import_results, 
      Kaminari.paginate_array(file.resource_import_results).page(1))
    admin = User.find('enjuadmin')
    view.stub(:current_user).and_return(admin)
    @ability = EnjuLeaf::Ability.new(admin, '0.0.0.0')
    @ability.extend(CanCan::Ability)
    controller.stub(:current_ability) { @ability }
  end

  it "renders a resource_import_file" do
    render
    expect(rendered).to match /MyString/
  end
  it "renders a list of resource_import_results" do
    render
    expect(rendered).to match /<table/
    expect(rendered).to render_template "resource_import_files/_results"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enju_biblio-0.1.3 spec/views/resource_import_files/show.html.erb_spec.erb
enju_biblio-0.1.2 spec/views/resource_import_files/show.html.erb_spec.erb
enju_biblio-0.1.1 spec/views/resource_import_files/show.html.erb_spec.erb
enju_biblio-0.1.0 spec/views/resource_import_files/show.html.erb_spec.erb
enju_biblio-0.1.0.pre71 spec/views/resource_import_files/show.html.erb_spec.erb
enju_biblio-0.1.0.pre70 spec/views/resource_import_files/show.html.erb_spec.erb