Fix incorrectly converted collection assertions

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/1461/head
Alex Coles 10 years ago
parent 0c8e2e331e
commit b77334119c
  1. 12
      spec/models/custom_field_spec.rb
  2. 6
      spec/models/work_package_spec.rb

@ -119,7 +119,7 @@ describe CustomField do
"locale" => "de" } ]
end
it { expect(field.size).to eq(1) }
it { expect(field.translations.size).to eq(1) }
it { expect(field.name(:de)).to eq("Feld") }
it { expect(field.default_value(:de)).to eq("zwei") }
it { expect(field.possible_values(:locale => :de)).to eq(["eins", "zwei", "drei"]) }
@ -130,7 +130,7 @@ describe CustomField do
field.translations_attributes = [ { "locale" => "de" } ]
end
it { expect(field.size).to eq(0) }
it { expect(field.translations.size).to eq(0) }
end
describe "WHEN providing a hash with a locale and blank values" do
@ -141,7 +141,7 @@ describe CustomField do
"locale" => "de" } ]
end
it { expect(field.size).to eq(0) }
it { expect(field.translations.size).to eq(0) }
end
describe "WHEN providing a hash with a locale and only one values" do
@ -150,7 +150,7 @@ describe CustomField do
"locale" => "de" } ]
end
it { expect(field.size).to eq(1) }
it { expect(field.translations.size).to eq(1) }
it { expect(field.name(:de)).to eq("Feld") }
end
@ -162,7 +162,7 @@ describe CustomField do
"locale" => "" } ]
end
it { expect(field.size).to eq(0) }
it { expect(field.translations.size).to eq(0) }
end
describe "WHEN already having a translation and wishing to delete it" do
@ -182,7 +182,7 @@ describe CustomField do
field.save!
end
it { expect(field.size).to eq(1) }
it { expect(field.translations.size).to eq(1) }
end
end

@ -1126,7 +1126,7 @@ describe WorkPackage do
"activity_id" => activity.id.to_s,
"comments" => "blubs" } } )
expect(instance.size).to eq(1)
expect(instance.time_entries.size).to eq(1)
entry = instance.time_entries.first
@ -1145,7 +1145,7 @@ describe WorkPackage do
"activity_id" => activity.id.to_s,
"comments" => "blubs" } } )
expect(instance.size).to eq(1)
expect(instance.time_entries.size).to eq(1)
entry = instance.time_entries.first
@ -1159,7 +1159,7 @@ describe WorkPackage do
instance.update_by!(user, :time_entry => time_attributes)
expect(instance.size).to eq(0)
expect(instance.time_entries.size).to eq(0)
end
end

Loading…
Cancel
Save