spec/unit/table_spec.rb in lhm-1.0.0.rc2 vs spec/unit/table_spec.rb in lhm-1.0.0.rc3
- old
+ new
@@ -1,9 +1,7 @@
-#
-# Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias
-# Schmidt
-#
+# Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias
+# Schmidt
require File.expand_path(File.dirname(__FILE__)) + '/unit_helper'
require 'lhm/table'
@@ -16,34 +14,10 @@
end
it "should name destination" do
@table.destination_name.must_equal "lhmn_users"
end
-
- it "should name index with a single column" do
- @table.
- idx_name(["name"]).
- must_equal("index_users_on_name")
- end
-
- it "should name index with multiple columns" do
- @table.
- idx_name(["name", "firstname"]).
- must_equal("index_users_on_name_and_firstname")
- end
-
- it "should name index with prefixed column" do
- @table.
- idx_name(["name(10)", "firstname"]).
- must_equal("index_users_on_name_and_firstname")
- end
-
- it "should name index with column names given as symbol" do
- @table.
- idx_name([:name, :firstname]).
- must_equal("index_users_on_name_and_firstname")
- end
end
describe "constraints" do
it "should be satisfied with a single column primary key called id" do
@table = Lhm::Table.new("table", "id")
@@ -95,6 +69,5 @@
must_equal("(`reference`)")
end
end
end
end
-