diff --git a/spec/fixtures/themes/default2.zip b/spec/fixtures/themes/default2.zip new file mode 100644 index 00000000..86dc0475 Binary files /dev/null and b/spec/fixtures/themes/default2.zip differ diff --git a/spec/lib/locomotive/import_spec.rb b/spec/lib/locomotive/import_spec.rb index 06389651..829ef09b 100644 --- a/spec/lib/locomotive/import_spec.rb +++ b/spec/lib/locomotive/import_spec.rb @@ -137,4 +137,20 @@ describe Locomotive::Import::Job do end end + context 'with a content referencing an asset' do + before(:all) do + @site = FactoryGirl.create(:site) + + job = Locomotive::Import::Job.new(FixturedTheme.duplicate_and_open('default2.zip'), @site, { :samples => true, :reset => true }) + job.perform + + job.success nil + end + + it 'will fix the url inside content' do + content = @site.content_types.where(:slug => 'messages').first.contents.first + asset = @site.assets.first + content.message.should == "" + end + end end