Permalink
Browse files

Add test case for issue#23

  • Loading branch information...
Tim Connor
Tim Connor committed Feb 21, 2013
1 parent 56df8b8 commit 07c5291804a2ec4adcaf668d5b9a937cd4e89345
Showing with 13 additions and 1 deletion.
  1. +13 −1 spec/integration_spec.rb
View
@@ -118,6 +118,18 @@
@article.languages_before_type_cast.should == '{"\\\\","\\""}'
@article.languages.should == ["\\","\""]
end
- end
+ it 'is able to be contatenated with new arrays' do
+ article = Article.new
+ article.languages = (article.languages || []) + ['a', 'b', 'c']
+ article.save!
+ article.reload
+ article.languages.should == ['a', 'b', 'c']
+
+ article.languages += ['d']
+ article.save!
+ article.reload
+ article.languages.should == ['a', 'b', 'c', 'd']
+ end
+ end
end

0 comments on commit 07c5291

Please sign in to comment.