Sha256: eeddc8eb152e4bdd11cf76e3a8f2dd619ab85f510b00aee6bf0db13437ef09b1
Contents?: true
Size: 1020 Bytes
Versions: 6
Compression:
Stored size: 1020 Bytes
Contents
require 'spec_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) @ability = EnjuLeaf::Ability.new(admin, '0.0.0.0') @ability.extend(CanCan::Ability) controller.stub(:current_ability) { @ability } 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
6 entries across 6 versions & 1 rubygems