Sha256: 2090d034ee351c8c0c73667ca305064a39ee6e869a9eea9d76caec339553972d

Contents?: true

Size: 1.03 KB

Versions: 14

Compression:

Stored size: 1.03 KB

Contents

# Copyright (C) 2009  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

class TestAssociations < Test::Unit::TestCase
  include ActiveGroongaTestUtils

  def test_belongs_to
    groonga = Bookmark.select do |record|
      record.uri == "http://groonga.org/"
    end.first
    assert_equal(User.select {|record| record.name == "daijiro"}.first,
                 groonga.user)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activegroonga-4.2.1 test/test-associations.rb
activegroonga-4.2.0 test/test-associations.rb
activegroonga-4.0.0 test/test-associations.rb
activegroonga-2.1.4 test/test-associations.rb
activegroonga-2.1.3 test/test-associations.rb
activegroonga-2.1.2 test/test-associations.rb
activegroonga-2.1.1 test/test-associations.rb
activegroonga-1.0.7 test/test-associations.rb
activegroonga-1.0.6 test/test-associations.rb
activegroonga-1.0.5 test/test-associations.rb
activegroonga-1.0.4 test/test-associations.rb
activegroonga-1.0.3 test/test-associations.rb
activegroonga-1.0.1 test/test-associations.rb
activegroonga-1.0.0 test/test-associations.rb