Update importer_spec for system user
This commit is contained in:
parent
a9f3489237
commit
10547848f0
|
@ -170,13 +170,11 @@ describe Jobs::Importer do
|
|||
end
|
||||
|
||||
# Neil, please have a look here
|
||||
pending "should have a users table that's empty" do
|
||||
it "should have a users table that's empty" do
|
||||
@user1 = Fabricate(:user)
|
||||
# community user needs to be accounted for
|
||||
User.count.should == 2
|
||||
Jobs::Importer.any_instance.stubs(:ordered_models_for_import).returns([User])
|
||||
Jobs::Importer.new.execute(@importer_args)
|
||||
User.count.should == 1
|
||||
User.count.should == 0 # empty table (data loading is stubbed for this test)
|
||||
end
|
||||
|
||||
it "should indicate that an import is running" do
|
||||
|
@ -192,7 +190,6 @@ describe Jobs::Importer do
|
|||
Discourse.expects(:enable_maintenance_mode).in_sequence(seq).at_least_once
|
||||
Jobs::Importer.any_instance.expects(:backup_tables).in_sequence(seq).at_least_once
|
||||
Jobs::Importer.any_instance.expects(:load_data).in_sequence(seq).at_least_once
|
||||
# fails here
|
||||
Jobs::Importer.new.execute( @importer_args )
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue