Sha256: d5165576e0f0bbf859be7ce3935bc959d06cc7468503cc503496929f832123e3

Contents?: true

Size: 831 Bytes

Versions: 32

Compression:

Stored size: 831 Bytes

Contents

require 'rails_helper'

describe "user_import_results/index" do
  fixtures :all

  before(:each) do
    assign(:user_import_results, UserImportResult.page(1))
    admin = User.friendly.find('enjuadmin')
    view.stub(:current_user).and_return(admin)
  end

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

  context "with @user_import_file" do
    before(:each) do
      @user_import_file = UserImportFile.find(1)
      @user_import_results = UserImportResult.where(user_import_file_id: 1).page(1)
    end
    it "renders a list of user_import_results for the user_import_file" do
      render
      expect(view).to render_template "user_import_results/_list_lines"
      expect(rendered).to match /MyString/
      expect(rendered).to match /<td>1<\/td>/
    end
  end
end

Version data entries

32 entries across 30 versions & 2 rubygems

Version Path
enju_library-0.3.11 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.10 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.9 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.8 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.8.rc.2 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.8.rc.1 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.4.0.rc.1 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.7 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.6 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.4.0.beta.4 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.4.0.beta.3 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.4.0.beta.2 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.4.0.beta.1 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.5 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.4 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.3 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.2 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.1 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.0 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.3.0.rc.1 spec/views/user_import_results/index.html.erb_spec.rb