Do not show getting started after account import

This commit is contained in:
NG 2019-06-26 12:49:05 +05:30
parent 0f0b3edec2
commit e3de008453
2 changed files with 3 additions and 0 deletions

View file

@ -25,10 +25,12 @@ class ArchiveImporter
email strip_exif show_community_spotlight_in_stream language disable_mail auto_follow_back email strip_exif show_community_spotlight_in_stream language disable_mail auto_follow_back
] ]
data = convert_keys(archive_hash["user"], allowed_keys) data = convert_keys(archive_hash["user"], allowed_keys)
# setting getting_started to false as the user doesn't need to see the getting started wizard
data.merge!( data.merge!(
username: attr[:username], username: attr[:username],
password: attr[:password], password: attr[:password],
password_confirmation: attr[:password], password_confirmation: attr[:password],
getting_started: false,
person: { person: {
profile_attributes: profile_attributes profile_attributes: profile_attributes
} }

View file

@ -155,6 +155,7 @@ describe ArchiveImporter do
expect(archive_importer.user.language).to eq("ru") expect(archive_importer.user.language).to eq("ru")
expect(archive_importer.user.disable_mail).to eq(false) expect(archive_importer.user.disable_mail).to eq(false)
expect(archive_importer.user.auto_follow_back).to eq(true) expect(archive_importer.user.auto_follow_back).to eq(true)
expect(archive_importer.user.getting_started).to be_falsey
expect(archive_importer.user.profile.first_name).to eq("First") expect(archive_importer.user.profile.first_name).to eq("First")
expect(archive_importer.user.profile.last_name).to eq("Last") expect(archive_importer.user.profile.last_name).to eq("Last")