|
|
@ -41,12 +41,12 @@ describe OpenProject::JournalFormatter::Attachment do |
|
|
|
#it { instance.render(key, [nil, attachment.id.to_s]).should == expected } |
|
|
|
#it { instance.render(key, [nil, attachment.id.to_s]).should == expected } |
|
|
|
# |
|
|
|
# |
|
|
|
# Setting value by hand is just a workaround until rspec bug is fixed |
|
|
|
# Setting value by hand is just a workaround until rspec bug is fixed |
|
|
|
it { instance.render(key, [nil, attachment.id.to_s]).should == I18n.t(:text_journal_added, :label => "<strong>#{I18n.t(:label_attachment)}</strong>", :value => "<a href=\"/attachments/#{attachment.id}/#{attachment.filename}\">#{attachment.filename}</a>") } |
|
|
|
it { instance.render(key, [nil, attachment.id.to_s]).should == I18n.t(:text_journal_added, :label => "<strong>#{I18n.t(:'activerecord.models.attachment')}</strong>", :value => "<a href=\"/attachments/#{attachment.id}/#{attachment.filename}\">#{attachment.filename}</a>") } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "WITH the first value beeing an id as string, and the second nil" do |
|
|
|
describe "WITH the first value beeing an id as string, and the second nil" do |
|
|
|
let(:expected) { I18n.t(:text_journal_deleted, |
|
|
|
let(:expected) { I18n.t(:text_journal_deleted, |
|
|
|
:label => "<strong>#{I18n.t(:label_attachment)}</strong>", |
|
|
|
:label => "<strong>#{I18n.t(:'activerecord.models.attachment')}</strong>", |
|
|
|
:old => "<strike><i>#{attachment.id}</i></strike>") } |
|
|
|
:old => "<strike><i>#{attachment.id}</i></strike>") } |
|
|
|
|
|
|
|
|
|
|
|
it { instance.render(key, [attachment.id.to_s, nil]).should == expected } |
|
|
|
it { instance.render(key, [attachment.id.to_s, nil]).should == expected } |
|
|
@ -55,7 +55,7 @@ describe OpenProject::JournalFormatter::Attachment do |
|
|
|
describe "WITH the first value beeing nil, and the second an id as a string |
|
|
|
describe "WITH the first value beeing nil, and the second an id as a string |
|
|
|
WITH specifying not to output html" do |
|
|
|
WITH specifying not to output html" do |
|
|
|
let(:expected) { I18n.t(:text_journal_added, |
|
|
|
let(:expected) { I18n.t(:text_journal_added, |
|
|
|
:label => I18n.t(:label_attachment), |
|
|
|
:label => I18n.t(:'activerecord.models.attachment'), |
|
|
|
:value => attachment.id) } |
|
|
|
:value => attachment.id) } |
|
|
|
|
|
|
|
|
|
|
|
it { instance.render(key, [nil, attachment.id.to_s], :no_html => true).should == expected } |
|
|
|
it { instance.render(key, [nil, attachment.id.to_s], :no_html => true).should == expected } |
|
|
@ -64,7 +64,7 @@ describe OpenProject::JournalFormatter::Attachment do |
|
|
|
describe "WITH the first value beeing an id as string, and the second nil, |
|
|
|
describe "WITH the first value beeing an id as string, and the second nil, |
|
|
|
WITH specifying not to output html" do |
|
|
|
WITH specifying not to output html" do |
|
|
|
let(:expected) { I18n.t(:text_journal_deleted, |
|
|
|
let(:expected) { I18n.t(:text_journal_deleted, |
|
|
|
:label => I18n.t(:label_attachment), |
|
|
|
:label => I18n.t(:'activerecord.models.attachment'), |
|
|
|
:old => attachment.id) } |
|
|
|
:old => attachment.id) } |
|
|
|
|
|
|
|
|
|
|
|
it { instance.render(key, [attachment.id.to_s, nil], :no_html => true).should == expected } |
|
|
|
it { instance.render(key, [attachment.id.to_s, nil], :no_html => true).should == expected } |
|
|
|