Permalink
Browse files

added some new assertions to merging tests

  • Loading branch information...
1 parent 7f81c99 commit 3a9ef83996e8910cb81fe9be047b11e0dc7e0508 @knowuh committed Mar 2, 2009
Showing with 210 additions and 26 deletions.
  1. BIN db/test.sqlite3
  2. +81 −0 log/development.log
  3. +95 −0 log/test.log
  4. +11 −2 test/integration/otmlutil_test.rb
  5. +23 −24 test/unit/bundle_test.rb
View
BIN db/test.sqlite3
Binary file not shown.
View
81 log/development.log
@@ -6288,3 +6288,84 @@ Migrating to AddUuidToNode (20090226152823)
SQL (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090843')
SQL (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090920')
SQL (2.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090932')
+ SQL (1.7ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) SELECT version FROM schema_migrations
+ SQL (0.1ms) select sqlite_version(*)
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.9ms) CREATE TABLE "nodes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bundle_id" integer, "parent_id" integer, "created_at" datetime, "updated_at" datetime, "group_id" integer, "start" datetime, "end" datetime, "uuid" text) 
+ SQL (0.1ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
+ SQL (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226152823')
+ SQL (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20090225231442')
+ SQL (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090843')
+ SQL (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090920')
+ SQL (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090932')
+ SQL (0.7ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) SELECT version FROM schema_migrations
+ SQL (0.1ms) select sqlite_version(*)
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.6ms) CREATE TABLE "nodes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bundle_id" integer, "parent_id" integer, "created_at" datetime, "updated_at" datetime, "group_id" integer, "start" datetime, "end" datetime, "uuid" text) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
+ SQL (2.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (3.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226152823')
+ SQL (2.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20090225231442')
+ SQL (2.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090843')
+ SQL (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090920')
+ SQL (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090932')
+ SQL (0.8ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.4ms) SELECT version FROM schema_migrations
+ SQL (0.1ms) select sqlite_version(*)
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (44.2ms) CREATE TABLE "nodes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "bundle_id" integer, "parent_id" integer, "created_at" datetime, "updated_at" datetime, "group_id" integer, "start" datetime, "end" datetime, "uuid" text) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
+ SQL (2.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (2.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226152823')
+ SQL (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20090225231442')
+ SQL (2.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090843')
+ SQL (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090920')
+ SQL (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20090226090932')
View
95 log/test.log
@@ -2786,3 +2786,98 @@ WARNING: Can't mass-assign these protected attributes: bundle_id
Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 16:37:42', 2, '2009-03-02 16:37:42', NULL, NULL, NULL, NULL, NULL)
Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 16:37:42', 3, '2009-03-02 16:37:42', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Load (0.3ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:10', 2, '2009-03-02 18:44:10', NULL, NULL, NULL, NULL, NULL)
+ Node Load (0.4ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:10', 2, '2009-03-02 18:44:10', NULL, NULL, NULL, NULL, NULL)
+ Node Load (0.3ms) SELECT * FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 4) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:10', 4, '2009-03-02 18:44:10', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 5) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 5, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 6) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 6, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332879 WHERE "id" = 996332880
+ Node Load (0.3ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332879) ORDER BY bundle_id
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332880) ORDER BY bundle_id
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 4) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 4, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 5) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 5, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 6) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 6, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332879 WHERE "id" = 996332880
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332878) 
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332879) 
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332878) 
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 4) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 4, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 5) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 5, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 6) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 6, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332879 WHERE "id" = 996332880
+ Node Load (0.3ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332879) ORDER BY bundle_id
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332880) ORDER BY bundle_id
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 4) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 4, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 5) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 5, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 6) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 6, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332879 WHERE "id" = 996332880
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332879) ORDER BY bundle_id
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332880) ORDER BY bundle_id
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332878) 
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332878) 
+ Node Load (0.3ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id LIMIT 1
+ Node Load (0.2ms) SELECT * FROM "nodes" WHERE ("nodes"."id" = 996332878) 
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Update (0.1ms) UPDATE "nodes" SET "updated_at" = '2009-03-02 18:44:11', "parent_id" = 996332878 WHERE "id" = 996332879
+ SQL (0.1ms) SELECT count(*) AS count_all FROM "nodes" WHERE ("nodes".parent_id = 996332878) 
+ Node Exists (0.2ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332879) ORDER BY bundle_id
+ Node Exists (0.3ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.3ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332878) ORDER BY bundle_id
+ Node Load (0.1ms) SELECT * FROM "nodes" WHERE ("nodes".parent_id = 996332879) ORDER BY bundle_id
+ Node Exists (0.3ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 1) LIMIT 1
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 2) LIMIT 1
+ Node Create (0.2ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 2, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
+ Node Exists (0.1ms) SELECT "nodes".id FROM "nodes" WHERE ("nodes"."bundle_id" = 3) LIMIT 1
+ Node Create (0.1ms) INSERT INTO "nodes" ("created_at", "bundle_id", "updated_at", "uuid", "group_id", "end", "start", "parent_id") VALUES('2009-03-02 18:44:11', 3, '2009-03-02 18:44:11', NULL, NULL, NULL, NULL, NULL)
View
13 test/integration/otmlutil_test.rb
@@ -13,6 +13,7 @@ class OTMLUtilTest < Test::Unit::TestCase
@wdir = File.dirname(__FILE__)
@xml_file_a = File.join(@wdir, "a.xml")
@xml_file_b = File.join(@wdir, "b.xml")
+
@text_xml_a = <<DONE
<container_a>
<one>first</one>
@@ -53,10 +54,18 @@ class OTMLUtilTest < Test::Unit::TestCase
assert_equal 8,doc.xpath("/container_a/*").size
assert_equal "five",doc.xpath("container_a/five").text
assert_equal "six",doc.xpath("container_a/six").text
- puts "element seven (mystery) is: #{doc.xpath("container_a/seven")}"
- puts "element eight (mystery) is: #{doc.xpath("container_a/eight")}"
+ assert_equal "six plus one", doc.xpath("container_a/seven").text
+ assert_equal "7 + 1", doc.xpath("container_a/eight").text
end
end
+ context "using actual OTML files" do
+ setup do
+ @OTML_a = File.join(@wdir, "../fixtures/76604.xml")
+ @OTML_b = File.join(@wdir, "../fixtures/79332.xml")
+ end
+
+ end
+
end
View
47 test/unit/bundle_test.rb
@@ -3,32 +3,31 @@
class BundleTest < Test::Unit::TestCase
- setup do
- @bundle_a = {
- :id => 1,
- :sail_session_uuid => '001'
- }.to_xml(:root => 'bundle')
- @bundle_b = {
- :id => 2,
- :sail_session_uuid => '002'
- }.to_xml(:root => 'bundle')
- @bundle_c = {
- :id => 3,
- :sail_session_uuid => '002'
- }.to_xml(:root => 'bundle')
-
- # @bundle_list = [@bundle_a,@bundle_c, @bundle_d].to_xml(:root => 'bundles')
- ActiveResource::HttpMock.respond_to do |mock|
- mock.get "/13/bundle/1.xml", {}, @bundle_a
- mock.get "/13/bundle/2.xml", {}, @bundle_b
- mock.get "/13/bundle/3.xml", {}, @bundle_c
+ secontext "with mocked bundles" do
+ setup do
+ bundles = []
+ ActiveResource::HttpMock.respond_to do |mock|
+ 1.upto(10) do | number |
+ bundles[number] = {
+ :id => number,
+ :sail_session_uuid => "%.4d" % number
+ }.to_xml(:root => 'bundle')
+ mock.get "/13/bundles/#{number}.xml", {}, bundles[number]
+ end
+ mock.get "/13/bundles.xml", {}, "<bunldes>#{bundles.join("\n")}</bundles>"
+ end
+
+ @bundle_a = Bundle.find(1)
+ @bundle_b = Bundle.find(2)
+ @bundle_c = Bundle.find(3)
end
- end
- context "Unfetched Bundle" do
- should "have a good collection path" do
- assert_equal '/13/bundles.xml', Bundle.collection_path
- end
+ context "Unfetched Bundles" do
+ should "have a good collection path" do
+ assert_equal '/13/bundles.xml', Bundle.collection_path
+ end
+ end
+
end
end

0 comments on commit 3a9ef83

Please sign in to comment.