Sha256: 3913e32b63756d09937b6fbaa780b06ff75b0971da19fa9be1712abfadfe00f1

Contents?: true

Size: 822 Bytes

Versions: 8

Compression:

Stored size: 822 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.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

8 entries across 8 versions & 2 rubygems

Version Path
enju_library-0.2.0.beta.8 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.7 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.6 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.5 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.4 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.3 spec/views/user_import_results/index.html.erb_spec.rb
enju_library-0.2.0.beta.2 spec/views/user_import_results/index.html.erb_spec.rb
enju_leaf-1.2.0.beta.1 spec/views/user_import_results/index.html.erb_spec.rb