page_parts 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +1 -1
- data/README.md +49 -0
- data/Rakefile +1 -1
- data/db/migrate/20111226144515_create_page_parts.rb +6 -6
- data/lib/page_parts.rb +3 -4
- data/lib/page_parts/extension.rb +34 -35
- data/lib/page_parts/models/active_record/page_part.rb +4 -5
- data/lib/page_parts/models/mongoid/page_part.rb +6 -7
- data/lib/page_parts/orm/active_record.rb +0 -1
- data/lib/page_parts/orm/mongoid.rb +0 -1
- data/lib/page_parts/{engine.rb → rails.rb} +1 -1
- data/lib/page_parts/version.rb +1 -1
- data/test/dummy/config/environments/production.rb +2 -1
- data/test/dummy/config/environments/test.rb +4 -1
- data/test/dummy/log/test.log +1026 -71
- data/test/models/category_test.rb +18 -19
- data/test/models/page_part_test.rb +8 -13
- data/test/models/post_test.rb +11 -12
- data/test/page_parts_test.rb +1 -1
- metadata +90 -100
- data/README.rdoc +0 -44
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 967503cfb44967b8cc7c9548cf0d87cf48588590
|
4
|
+
data.tar.gz: ccaa61711a8a49dc8744c12d624c61c120e7411f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e233c671da198cb80414d5633dcb20dc63e8ea5397a7a126481dbfe3b3c54b15c8603d4f3ce2ab405bd2c9b8e43a1b97c5d3ffb2801d0605a8a59cbd38b03084
|
7
|
+
data.tar.gz: b527c541a052513c7b97cdee4c8ac138d01ff67ca0ce7eb8ec82d40b882887cab2aec5de3ea0acc1701fcb34d0bff53d1026e23691d3c90e0c1c901839999dfd
|
data/MIT-LICENSE
CHANGED
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# PageParts
|
2
|
+
|
3
|
+
[![Build Status](https://semaphoreci.com/api/v1/igor-galeta/page_parts/branches/master/shields_badge.svg)](https://semaphoreci.com/igor-galeta/page_parts)
|
4
|
+
|
5
|
+
Enable dynamic string attributes in your model
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
gem 'page_parts'
|
10
|
+
|
11
|
+
ActiveRecord:
|
12
|
+
|
13
|
+
require 'page_parts/orm/active_record'
|
14
|
+
rake page_parts_engine:install:migrations
|
15
|
+
|
16
|
+
Mongoid:
|
17
|
+
|
18
|
+
require 'page_parts/orm/mongoid'
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Setup fields at your model:
|
23
|
+
|
24
|
+
class Category < ActiveRecord::Base
|
25
|
+
include PageParts::Extension
|
26
|
+
|
27
|
+
page_parts :content, :sidebar
|
28
|
+
end
|
29
|
+
|
30
|
+
Use fields as normal attributes:
|
31
|
+
|
32
|
+
@category = Category.new
|
33
|
+
@category.content = "Some text"
|
34
|
+
@category.sidebar = "Sidebar text"
|
35
|
+
@category.save
|
36
|
+
|
37
|
+
Setup fields with suffixes:
|
38
|
+
|
39
|
+
page_parts :sidebar, suffix: [:en, :uk]
|
40
|
+
|
41
|
+
page_parts :content, suffix: I18n.available_locales
|
42
|
+
|
43
|
+
It generates attributes: sidebar_en, sidebar_uk
|
44
|
+
|
45
|
+
## Tests
|
46
|
+
|
47
|
+
rake test
|
48
|
+
|
49
|
+
Copyright (c) 2012 Fodojo, released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
class CreatePageParts < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
3
|
create_table :page_parts do |t|
|
4
|
-
t.string :key, :
|
4
|
+
t.string :key, limit: 20, null: false
|
5
5
|
t.text :content
|
6
|
-
|
7
|
-
t.integer :partable_id, :
|
8
|
-
t.string :partable_type, :
|
9
|
-
|
6
|
+
|
7
|
+
t.integer :partable_id, null: false
|
8
|
+
t.string :partable_type, limit: 80, null: false
|
9
|
+
|
10
10
|
t.timestamps
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
add_index :page_parts, :key
|
14
14
|
add_index :page_parts, [:partable_type, :partable_id]
|
15
15
|
end
|
data/lib/page_parts.rb
CHANGED
data/lib/page_parts/extension.rb
CHANGED
@@ -3,34 +3,34 @@ require 'active_support/concern'
|
|
3
3
|
module PageParts
|
4
4
|
module Extension
|
5
5
|
extend ActiveSupport::Concern
|
6
|
-
|
6
|
+
|
7
7
|
included do
|
8
|
-
class_attribute :page_parts_definitions, :
|
9
|
-
self.page_parts_definitions = { :
|
10
|
-
|
11
|
-
has_many :page_parts, :
|
12
|
-
|
13
|
-
accepts_nested_attributes_for :page_parts, :
|
8
|
+
class_attribute :page_parts_definitions, instance_writer: false
|
9
|
+
self.page_parts_definitions = { keys: [] }
|
10
|
+
|
11
|
+
has_many :page_parts, as: :partable, dependent: :destroy, autosave: true
|
12
|
+
|
13
|
+
accepts_nested_attributes_for :page_parts, reject_if: :all_blank, allow_destroy: true
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
module ClassMethods
|
17
17
|
## PageParts
|
18
18
|
# Enable page parts in your model:
|
19
19
|
#
|
20
|
-
# page_parts :main, :left, :sidebar, :
|
20
|
+
# page_parts :main, :left, :sidebar, suffix: [:en, :uk]
|
21
21
|
#
|
22
22
|
def page_parts(*args)
|
23
|
-
options = { :
|
24
|
-
|
23
|
+
options = { suffix: [nil] }.merge(args.extract_options!)
|
24
|
+
|
25
25
|
args.each do |attr_name|
|
26
|
-
Array
|
26
|
+
Array(options[:suffix]).each do |suffix|
|
27
27
|
method_name = [attr_name, suffix].compact.map(&:to_s).join('_')
|
28
|
-
|
29
|
-
|
28
|
+
page_parts_definitions[:keys] << method_name
|
29
|
+
|
30
30
|
define_method(method_name) do
|
31
31
|
_page_part(method_name).try(:content)
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
define_method("#{method_name}=") do |value|
|
35
35
|
record = _page_part(method_name)
|
36
36
|
record.content = value
|
@@ -39,36 +39,35 @@ module PageParts
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# Find page part by key or build new record
|
44
44
|
def find_or_build_page_part(attr_name)
|
45
45
|
key = normalize_page_part_key(attr_name)
|
46
|
-
|
46
|
+
page_parts.detect { |record| record.key.to_s == key } || page_parts.build(key: key)
|
47
47
|
end
|
48
48
|
|
49
49
|
def reload(*args)
|
50
50
|
@cached_page_parts = nil
|
51
51
|
super(*args)
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
protected
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
key
|
55
|
+
|
56
|
+
# Save page parts records into one hash
|
57
|
+
def _page_part(attr_name)
|
58
|
+
key = normalize_page_part_key(attr_name)
|
59
|
+
@cached_page_parts ||= {}
|
60
|
+
@cached_page_parts[key] ||= find_or_build_page_part(key)
|
61
|
+
end
|
62
|
+
|
63
|
+
def normalize_page_part_key(value)
|
64
|
+
key = value.to_s.downcase.strip
|
65
|
+
|
66
|
+
unless page_parts_definitions[:keys].include?(key)
|
67
|
+
raise NoMethodError, "Page part #{key} not registered"
|
71
68
|
end
|
72
|
-
|
69
|
+
|
70
|
+
key
|
71
|
+
end
|
73
72
|
end
|
74
73
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class PagePart < ::ActiveRecord::Base
|
2
|
-
belongs_to :partable, :
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
2
|
+
belongs_to :partable, polymorphic: true
|
3
|
+
|
4
|
+
validates :key, presence: true
|
5
|
+
end
|
@@ -5,14 +5,13 @@ class PagePart
|
|
5
5
|
include Mongoid::Timestamps
|
6
6
|
|
7
7
|
# Columns
|
8
|
-
field :key, :
|
9
|
-
field :content, :
|
8
|
+
field :key, type: String
|
9
|
+
field :content, type: String
|
10
10
|
|
11
|
-
index(
|
11
|
+
index(key: 1)
|
12
12
|
|
13
13
|
# Relations
|
14
|
-
belongs_to :partable, :
|
15
|
-
|
16
|
-
validates_presence_of :key
|
17
|
-
validates_uniqueness_of :key, :scope => [:partable_type, :partable_id]
|
14
|
+
belongs_to :partable, polymorphic: true, index: true
|
15
|
+
|
16
|
+
validates_presence_of :key
|
18
17
|
end
|
data/lib/page_parts/version.rb
CHANGED
@@ -3,13 +3,14 @@ Dummy::Application.configure do
|
|
3
3
|
|
4
4
|
# Code is not reloaded between requests
|
5
5
|
config.cache_classes = true
|
6
|
+
config.eager_load = true
|
6
7
|
|
7
8
|
# Full error reports are disabled and caching is turned on
|
8
9
|
config.consider_all_requests_local = false
|
9
10
|
config.action_controller.perform_caching = true
|
10
11
|
|
11
12
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.
|
13
|
+
config.serve_static_files = false
|
13
14
|
|
14
15
|
# Compress JavaScripts and CSS
|
15
16
|
config.assets.compress = true
|
@@ -6,9 +6,10 @@ Dummy::Application.configure do
|
|
6
6
|
# your test database is "scratch space" for the test suite and is wiped
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
|
+
config.eager_load = false
|
9
10
|
|
10
11
|
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.
|
12
|
+
config.serve_static_files = true
|
12
13
|
config.static_cache_control = "public, max-age=3600"
|
13
14
|
|
14
15
|
# Log error messages when you accidentally call methods on nil
|
@@ -36,4 +37,6 @@ Dummy::Application.configure do
|
|
36
37
|
|
37
38
|
# Print deprecation notices to the stderr
|
38
39
|
config.active_support.deprecation = :stderr
|
40
|
+
|
41
|
+
config.active_support.test_order = :sorted
|
39
42
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -1,84 +1,1039 @@
|
|
1
|
-
[1m[
|
2
|
-
[1m[
|
3
|
-
[1m[
|
4
|
-
[1m[35m (
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
[1m[36m (0.1ms)[0m [
|
9
|
-
[1m[35m (0.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
[1m[
|
14
|
-
[1m[
|
15
|
-
|
16
|
-
[1m[
|
17
|
-
[1m[36m (0.
|
18
|
-
|
19
|
-
[1m[
|
20
|
-
[1m[
|
1
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5
|
+
------------------------------------------------
|
6
|
+
PostTest: test_should_has_page_parts_definitions
|
7
|
+
------------------------------------------------
|
8
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
9
|
+
[1m[35m (0.1ms)[0m begin transaction
|
10
|
+
-------------------------------------------------
|
11
|
+
PostTest: test_should_load_page_parts_into_record
|
12
|
+
-------------------------------------------------
|
13
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
14
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:07:06.491482"], ["updated_at", "2016-10-07 11:07:06.491482"]]
|
15
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.496265"], ["updated_at", "2016-10-07 11:07:06.496265"]]
|
16
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.497689"], ["updated_at", "2016-10-07 11:07:06.497689"]]
|
17
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
18
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
19
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
20
|
+
[1m[35m (1.3ms)[0m rollback transaction
|
21
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
22
|
+
-------------------------------------------------------------
|
23
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
24
|
+
-------------------------------------------------------------
|
25
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
26
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27
|
+
-----------------------------------------------------
|
28
|
+
PostTest: test_should_save_page_parts_with_new_record
|
29
|
+
-----------------------------------------------------
|
30
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
31
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
32
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:07:06.510799"], ["updated_at", "2016-10-07 11:07:06.510799"]]
|
33
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.511929"], ["updated_at", "2016-10-07 11:07:06.511929"]]
|
34
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.512958"], ["updated_at", "2016-10-07 11:07:06.512958"]]
|
35
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.513850"], ["updated_at", "2016-10-07 11:07:06.513850"]]
|
36
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
37
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
38
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
39
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
40
|
+
-----------------------------------------------------------------
|
41
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
42
|
+
-----------------------------------------------------------------
|
21
43
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
22
|
-
[1m[
|
23
|
-
[1m[35m (0.
|
24
|
-
[1m[
|
25
|
-
[1m[
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
[1m[
|
30
|
-
[1m[
|
44
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.518333"], ["updated_at", "2016-10-07 11:07:06.518333"]]
|
45
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
47
|
+
[1m[35m (0.1ms)[0m begin transaction
|
48
|
+
-----------------------------------------------------
|
49
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
50
|
+
-----------------------------------------------------
|
51
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52
|
+
[1m[35m (0.1ms)[0m begin transaction
|
53
|
+
--------------------------------------------------------
|
54
|
+
PagePartTest: test_should_not_be_valid_with_not_uniq_key
|
55
|
+
--------------------------------------------------------
|
56
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
57
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "test"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.531056"], ["updated_at", "2016-10-07 11:07:06.531056"]]
|
58
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
59
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
60
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
61
|
+
------------------------
|
62
|
+
PagePartTest: test_truth
|
63
|
+
------------------------
|
64
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
65
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
66
|
+
----------------------------------------------------
|
67
|
+
CategoryTest: test_should_has_page_parts_definitions
|
68
|
+
----------------------------------------------------
|
69
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
70
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
71
|
+
-----------------------------------------------------
|
72
|
+
CategoryTest: test_should_load_page_parts_into_record
|
73
|
+
-----------------------------------------------------
|
31
74
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
32
|
-
[1m[
|
33
|
-
[1m[
|
34
|
-
[1m[36mSQL (0.
|
35
|
-
[1m[
|
36
|
-
[1m[
|
75
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:07:06.542155"], ["updated_at", "2016-10-07 11:07:06.542155"]]
|
76
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.545387"], ["updated_at", "2016-10-07 11:07:06.545387"]]
|
77
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.547945"], ["updated_at", "2016-10-07 11:07:06.547945"]]
|
78
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
79
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
80
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
81
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
82
|
+
[1m[35m (0.1ms)[0m begin transaction
|
83
|
+
-----------------------------------------------------------------
|
84
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
85
|
+
-----------------------------------------------------------------
|
86
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
87
|
+
[1m[35m (0.1ms)[0m begin transaction
|
88
|
+
---------------------------------------------------------
|
89
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
90
|
+
---------------------------------------------------------
|
91
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
92
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
93
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:07:06.556770"], ["updated_at", "2016-10-07 11:07:06.556770"]]
|
94
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.557919"], ["updated_at", "2016-10-07 11:07:06.557919"]]
|
95
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.558939"], ["updated_at", "2016-10-07 11:07:06.558939"]]
|
96
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
97
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
98
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
99
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
100
|
+
-------------------------------------------
|
101
|
+
CategoryTest: test_should_update_page_parts
|
102
|
+
-------------------------------------------
|
103
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
104
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:07:06.563181"], ["updated_at", "2016-10-07 11:07:06.563181"]]
|
105
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.564535"], ["updated_at", "2016-10-07 11:07:06.564535"]]
|
106
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:07:06.566034"], ["updated_at", "2016-10-07 11:07:06.566034"]]
|
107
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
108
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
109
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
110
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
111
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:07:06.570372"], ["id", 1]]
|
112
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 11:07:06.573353"], ["id", 2]]
|
37
113
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
38
|
-
[1m[
|
114
|
+
[1m[36mCategory Load (0.0ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
115
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
116
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
117
|
+
[1m[35m (0.1ms)[0m begin transaction
|
118
|
+
------------------------
|
119
|
+
CategoryTest: test_truth
|
120
|
+
------------------------
|
121
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
122
|
+
[1m[35m (0.1ms)[0m begin transaction
|
123
|
+
--------------------------------------------------
|
124
|
+
PagePartsTest: test_shound_be_included_by_Category
|
125
|
+
--------------------------------------------------
|
126
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
127
|
+
[1m[35m (0.1ms)[0m begin transaction
|
128
|
+
-------------------------
|
129
|
+
PagePartsTest: test_truth
|
130
|
+
-------------------------
|
131
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
132
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
133
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
134
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
135
|
+
[1m[35m (0.1ms)[0m begin transaction
|
136
|
+
------------------------------------------------
|
137
|
+
PostTest: test_should_has_page_parts_definitions
|
138
|
+
------------------------------------------------
|
139
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
140
|
+
[1m[35m (0.1ms)[0m begin transaction
|
141
|
+
-------------------------------------------------
|
142
|
+
PostTest: test_should_load_page_parts_into_record
|
143
|
+
-------------------------------------------------
|
144
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
145
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:08:13.323600"], ["updated_at", "2016-10-07 11:08:13.323600"]]
|
146
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.328401"], ["updated_at", "2016-10-07 11:08:13.328401"]]
|
147
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.331480"], ["updated_at", "2016-10-07 11:08:13.331480"]]
|
148
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
149
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
150
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
151
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
152
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
153
|
+
-------------------------------------------------------------
|
154
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
155
|
+
-------------------------------------------------------------
|
156
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
157
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
158
|
+
-----------------------------------------------------
|
159
|
+
PostTest: test_should_save_page_parts_with_new_record
|
160
|
+
-----------------------------------------------------
|
161
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
162
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
163
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:08:13.350221"], ["updated_at", "2016-10-07 11:08:13.350221"]]
|
164
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.351847"], ["updated_at", "2016-10-07 11:08:13.351847"]]
|
165
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.352992"], ["updated_at", "2016-10-07 11:08:13.352992"]]
|
166
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.353882"], ["updated_at", "2016-10-07 11:08:13.353882"]]
|
167
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
168
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
169
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
170
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
171
|
+
--------------------------------------------------
|
172
|
+
PagePartsTest: test_shound_be_included_by_Category
|
173
|
+
--------------------------------------------------
|
174
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
175
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
176
|
+
-------------------------
|
177
|
+
PagePartsTest: test_truth
|
178
|
+
-------------------------
|
179
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
181
|
+
----------------------------------------------------
|
182
|
+
CategoryTest: test_should_has_page_parts_definitions
|
183
|
+
----------------------------------------------------
|
184
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
185
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
186
|
+
-----------------------------------------------------
|
187
|
+
CategoryTest: test_should_load_page_parts_into_record
|
188
|
+
-----------------------------------------------------
|
189
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
190
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:08:13.372268"], ["updated_at", "2016-10-07 11:08:13.372268"]]
|
191
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.373483"], ["updated_at", "2016-10-07 11:08:13.373483"]]
|
192
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.374512"], ["updated_at", "2016-10-07 11:08:13.374512"]]
|
193
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
194
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
195
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
196
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
197
|
+
[1m[35m (0.1ms)[0m begin transaction
|
198
|
+
-----------------------------------------------------------------
|
199
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
200
|
+
-----------------------------------------------------------------
|
201
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
202
|
+
[1m[35m (0.1ms)[0m begin transaction
|
203
|
+
---------------------------------------------------------
|
204
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
205
|
+
---------------------------------------------------------
|
206
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
207
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
208
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:08:13.383276"], ["updated_at", "2016-10-07 11:08:13.383276"]]
|
209
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.384616"], ["updated_at", "2016-10-07 11:08:13.384616"]]
|
210
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.385997"], ["updated_at", "2016-10-07 11:08:13.385997"]]
|
211
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
212
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
213
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
214
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
215
|
+
-------------------------------------------
|
216
|
+
CategoryTest: test_should_update_page_parts
|
217
|
+
-------------------------------------------
|
39
218
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
40
|
-
[1m[
|
41
|
-
[1m[
|
42
|
-
[1m[36mSQL (0.
|
43
|
-
[1m[
|
44
|
-
[1m[
|
219
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:08:13.390567"], ["updated_at", "2016-10-07 11:08:13.390567"]]
|
220
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.391725"], ["updated_at", "2016-10-07 11:08:13.391725"]]
|
221
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.392728"], ["updated_at", "2016-10-07 11:08:13.392728"]]
|
222
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
223
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
224
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
225
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
226
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:08:13.396271"], ["id", 1]]
|
227
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 11:08:13.398392"], ["id", 2]]
|
45
228
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
46
|
-
[1m[36mCategory Load (0.1ms)[0m [1mSELECT
|
47
|
-
[1m[35mPagePart Load (0.
|
229
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
230
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
231
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
232
|
+
[1m[35m (0.1ms)[0m begin transaction
|
233
|
+
------------------------
|
234
|
+
CategoryTest: test_truth
|
235
|
+
------------------------
|
236
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
237
|
+
[1m[35m (0.0ms)[0m begin transaction
|
238
|
+
-----------------------------------------------------------------
|
239
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
240
|
+
-----------------------------------------------------------------
|
241
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
242
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.404876"], ["updated_at", "2016-10-07 11:08:13.404876"]]
|
243
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
244
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
245
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
246
|
+
-----------------------------------------------------
|
247
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
248
|
+
-----------------------------------------------------
|
249
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
250
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
251
|
+
--------------------------------------------------------
|
252
|
+
PagePartTest: test_should_not_be_valid_with_not_uniq_key
|
253
|
+
--------------------------------------------------------
|
254
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
255
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "test"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:08:13.416642"], ["updated_at", "2016-10-07 11:08:13.416642"]]
|
256
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
257
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
258
|
+
[1m[35m (0.1ms)[0m begin transaction
|
259
|
+
------------------------
|
260
|
+
PagePartTest: test_truth
|
261
|
+
------------------------
|
262
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
263
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
264
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
265
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
266
|
+
[1m[35m (0.1ms)[0m begin transaction
|
267
|
+
--------------------------------------------------
|
268
|
+
PagePartsTest: test_shound_be_included_by_Category
|
269
|
+
--------------------------------------------------
|
270
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
271
|
+
[1m[35m (0.1ms)[0m begin transaction
|
272
|
+
-------------------------
|
273
|
+
PagePartsTest: test_truth
|
274
|
+
-------------------------
|
275
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
276
|
+
[1m[35m (0.1ms)[0m begin transaction
|
277
|
+
------------------------------------------------
|
278
|
+
PostTest: test_should_has_page_parts_definitions
|
279
|
+
------------------------------------------------
|
280
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
281
|
+
[1m[35m (0.1ms)[0m begin transaction
|
282
|
+
-------------------------------------------------
|
283
|
+
PostTest: test_should_load_page_parts_into_record
|
284
|
+
-------------------------------------------------
|
48
285
|
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
49
|
-
[1m[
|
50
|
-
[1m[
|
51
|
-
[1m[
|
52
|
-
[1m[36m (0.
|
286
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:13:51.863350"], ["updated_at", "2016-10-07 11:13:51.863350"]]
|
287
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.869787"], ["updated_at", "2016-10-07 11:13:51.869787"]]
|
288
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.872480"], ["updated_at", "2016-10-07 11:13:51.872480"]]
|
289
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
290
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
291
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
292
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
293
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
294
|
+
-------------------------------------------------------------
|
295
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
296
|
+
-------------------------------------------------------------
|
297
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
298
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
299
|
+
-----------------------------------------------------
|
300
|
+
PostTest: test_should_save_page_parts_with_new_record
|
301
|
+
-----------------------------------------------------
|
302
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "page_parts"
|
303
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
304
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:13:51.890976"], ["updated_at", "2016-10-07 11:13:51.890976"]]
|
305
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.892126"], ["updated_at", "2016-10-07 11:13:51.892126"]]
|
306
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.893116"], ["updated_at", "2016-10-07 11:13:51.893116"]]
|
307
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.894001"], ["updated_at", "2016-10-07 11:13:51.894001"]]
|
308
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
309
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
310
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
311
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
312
|
+
-----------------------------------------------------------------
|
313
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
314
|
+
-----------------------------------------------------------------
|
315
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
316
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.899633"], ["updated_at", "2016-10-07 11:13:51.899633"]]
|
53
317
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
54
|
-
[1m[
|
55
|
-
[1m[
|
318
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
319
|
+
[1m[35m (0.1ms)[0m begin transaction
|
320
|
+
-----------------------------------------------------
|
321
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
322
|
+
-----------------------------------------------------
|
323
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
324
|
+
[1m[35m (0.1ms)[0m begin transaction
|
325
|
+
--------------------------------------------------------
|
326
|
+
PagePartTest: test_should_not_be_valid_with_not_uniq_key
|
327
|
+
--------------------------------------------------------
|
56
328
|
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
57
|
-
[1m[
|
58
|
-
[1m[
|
329
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "test"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.911626"], ["updated_at", "2016-10-07 11:13:51.911626"]]
|
330
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
331
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
332
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
333
|
+
------------------------
|
334
|
+
PagePartTest: test_truth
|
335
|
+
------------------------
|
336
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
337
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
338
|
+
----------------------------------------------------
|
339
|
+
CategoryTest: test_should_has_page_parts_definitions
|
340
|
+
----------------------------------------------------
|
341
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
342
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
343
|
+
-----------------------------------------------------
|
344
|
+
CategoryTest: test_should_load_page_parts_into_record
|
345
|
+
-----------------------------------------------------
|
346
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
347
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:13:51.922395"], ["updated_at", "2016-10-07 11:13:51.922395"]]
|
348
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.923627"], ["updated_at", "2016-10-07 11:13:51.923627"]]
|
349
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.925639"], ["updated_at", "2016-10-07 11:13:51.925639"]]
|
59
350
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
60
|
-
[1m[
|
351
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
352
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
353
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
354
|
+
[1m[35m (0.1ms)[0m begin transaction
|
355
|
+
-----------------------------------------------------------------
|
356
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
357
|
+
-----------------------------------------------------------------
|
358
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
359
|
+
[1m[35m (0.1ms)[0m begin transaction
|
360
|
+
---------------------------------------------------------
|
361
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
362
|
+
---------------------------------------------------------
|
363
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
364
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
365
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:13:51.933291"], ["updated_at", "2016-10-07 11:13:51.933291"]]
|
366
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.934460"], ["updated_at", "2016-10-07 11:13:51.934460"]]
|
367
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.935466"], ["updated_at", "2016-10-07 11:13:51.935466"]]
|
368
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
369
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
370
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
371
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
372
|
+
-------------------------------------------
|
373
|
+
CategoryTest: test_should_update_page_parts
|
374
|
+
-------------------------------------------
|
61
375
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
62
|
-
[1m[36mSQL (
|
376
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:13:51.940044"], ["updated_at", "2016-10-07 11:13:51.940044"]]
|
377
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.941714"], ["updated_at", "2016-10-07 11:13:51.941714"]]
|
378
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:13:51.942776"], ["updated_at", "2016-10-07 11:13:51.942776"]]
|
379
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
380
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
381
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
382
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
383
|
+
[1m[35mSQL (0.6ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:13:51.946902"], ["id", 1]]
|
384
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 11:13:51.949644"], ["id", 2]]
|
63
385
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
64
|
-
[1m[
|
386
|
+
[1m[36mCategory Load (0.0ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
387
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
388
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
389
|
+
[1m[35m (0.1ms)[0m begin transaction
|
390
|
+
------------------------
|
391
|
+
CategoryTest: test_truth
|
392
|
+
------------------------
|
393
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
394
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
395
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
396
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
397
|
+
[1m[35m (0.1ms)[0m begin transaction
|
398
|
+
-----------------------------------------------------------------
|
399
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
400
|
+
-----------------------------------------------------------------
|
401
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
402
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.815268"], ["updated_at", "2016-10-07 11:15:00.815268"]]
|
403
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
404
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
405
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
406
|
+
-----------------------------------------------------
|
407
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
408
|
+
-----------------------------------------------------
|
409
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
410
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
411
|
+
--------------------------------------------------------
|
412
|
+
PagePartTest: test_should_not_be_valid_with_not_uniq_key
|
413
|
+
--------------------------------------------------------
|
65
414
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
66
|
-
[1m[
|
67
|
-
[1m[35m (0.
|
68
|
-
[1m[
|
69
|
-
[1m[
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
[1m[
|
74
|
-
[1m[
|
415
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "test"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.834015"], ["updated_at", "2016-10-07 11:15:00.834015"]]
|
416
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
417
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
418
|
+
[1m[35m (0.1ms)[0m begin transaction
|
419
|
+
------------------------
|
420
|
+
PagePartTest: test_truth
|
421
|
+
------------------------
|
422
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
423
|
+
[1m[35m (0.0ms)[0m begin transaction
|
424
|
+
------------------------------------------------
|
425
|
+
PostTest: test_should_has_page_parts_definitions
|
426
|
+
------------------------------------------------
|
427
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
428
|
+
[1m[35m (0.1ms)[0m begin transaction
|
429
|
+
-------------------------------------------------
|
430
|
+
PostTest: test_should_load_page_parts_into_record
|
431
|
+
-------------------------------------------------
|
432
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
433
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:15:00.866830"], ["updated_at", "2016-10-07 11:15:00.866830"]]
|
434
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.868117"], ["updated_at", "2016-10-07 11:15:00.868117"]]
|
435
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.869209"], ["updated_at", "2016-10-07 11:15:00.869209"]]
|
436
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
437
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
438
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
439
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
440
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
441
|
+
-------------------------------------------------------------
|
442
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
443
|
+
-------------------------------------------------------------
|
444
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
445
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
446
|
+
-----------------------------------------------------
|
447
|
+
PostTest: test_should_save_page_parts_with_new_record
|
448
|
+
-----------------------------------------------------
|
449
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
450
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
451
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:15:00.885900"], ["updated_at", "2016-10-07 11:15:00.885900"]]
|
452
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.886950"], ["updated_at", "2016-10-07 11:15:00.886950"]]
|
453
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.887979"], ["updated_at", "2016-10-07 11:15:00.887979"]]
|
454
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.888941"], ["updated_at", "2016-10-07 11:15:00.888941"]]
|
455
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
456
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
457
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
458
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
459
|
+
--------------------------------------------------
|
460
|
+
PagePartsTest: test_shound_be_included_by_Category
|
461
|
+
--------------------------------------------------
|
462
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
463
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
464
|
+
-------------------------
|
465
|
+
PagePartsTest: test_truth
|
466
|
+
-------------------------
|
467
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
468
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
469
|
+
----------------------------------------------------
|
470
|
+
CategoryTest: test_should_has_page_parts_definitions
|
471
|
+
----------------------------------------------------
|
472
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
473
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
474
|
+
-----------------------------------------------------
|
475
|
+
CategoryTest: test_should_load_page_parts_into_record
|
476
|
+
-----------------------------------------------------
|
75
477
|
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
76
|
-
[1m[
|
77
|
-
[1m[
|
78
|
-
[1m[
|
79
|
-
[1m[
|
80
|
-
[1m[
|
81
|
-
[1m[
|
82
|
-
[1m[
|
83
|
-
[1m[35m (0.1ms)[0m
|
84
|
-
|
478
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:15:00.902930"], ["updated_at", "2016-10-07 11:15:00.902930"]]
|
479
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.904142"], ["updated_at", "2016-10-07 11:15:00.904142"]]
|
480
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.905179"], ["updated_at", "2016-10-07 11:15:00.905179"]]
|
481
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
482
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
483
|
+
[1m[35mPagePart Load (0.0ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
484
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
485
|
+
[1m[35m (0.1ms)[0m begin transaction
|
486
|
+
-----------------------------------------------------------------
|
487
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
488
|
+
-----------------------------------------------------------------
|
489
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
490
|
+
[1m[35m (0.1ms)[0m begin transaction
|
491
|
+
---------------------------------------------------------
|
492
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
493
|
+
---------------------------------------------------------
|
494
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
495
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
496
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:15:00.913379"], ["updated_at", "2016-10-07 11:15:00.913379"]]
|
497
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.914458"], ["updated_at", "2016-10-07 11:15:00.914458"]]
|
498
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.916125"], ["updated_at", "2016-10-07 11:15:00.916125"]]
|
499
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
500
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
501
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
502
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
503
|
+
-------------------------------------------
|
504
|
+
CategoryTest: test_should_update_page_parts
|
505
|
+
-------------------------------------------
|
506
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
507
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:15:00.920419"], ["updated_at", "2016-10-07 11:15:00.920419"]]
|
508
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.921773"], ["updated_at", "2016-10-07 11:15:00.921773"]]
|
509
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:00.922776"], ["updated_at", "2016-10-07 11:15:00.922776"]]
|
510
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
511
|
+
[1m[36mCategory Load (0.0ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
512
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
513
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
514
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:15:00.926190"], ["id", 1]]
|
515
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 11:15:00.929922"], ["id", 2]]
|
516
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
517
|
+
[1m[36mCategory Load (0.0ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
518
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
519
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
520
|
+
[1m[35m (0.1ms)[0m begin transaction
|
521
|
+
------------------------
|
522
|
+
CategoryTest: test_truth
|
523
|
+
------------------------
|
524
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
525
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
526
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
527
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
528
|
+
[1m[35m (0.1ms)[0m begin transaction
|
529
|
+
--------------------------------------------------
|
530
|
+
PagePartsTest: test_shound_be_included_by_Category
|
531
|
+
--------------------------------------------------
|
532
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
533
|
+
[1m[35m (0.1ms)[0m begin transaction
|
534
|
+
-------------------------
|
535
|
+
PagePartsTest: test_truth
|
536
|
+
-------------------------
|
537
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
538
|
+
[1m[35m (0.1ms)[0m begin transaction
|
539
|
+
----------------------------------------------------
|
540
|
+
CategoryTest: test_should_has_page_parts_definitions
|
541
|
+
----------------------------------------------------
|
542
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
543
|
+
[1m[35m (0.1ms)[0m begin transaction
|
544
|
+
-----------------------------------------------------
|
545
|
+
CategoryTest: test_should_load_page_parts_into_record
|
546
|
+
-----------------------------------------------------
|
547
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
548
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:15:52.184987"], ["updated_at", "2016-10-07 11:15:52.184987"]]
|
549
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.191010"], ["updated_at", "2016-10-07 11:15:52.191010"]]
|
550
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.192423"], ["updated_at", "2016-10-07 11:15:52.192423"]]
|
551
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
552
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
553
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
554
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
555
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
556
|
+
-----------------------------------------------------------------
|
557
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
558
|
+
-----------------------------------------------------------------
|
559
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
560
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
561
|
+
---------------------------------------------------------
|
562
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
563
|
+
---------------------------------------------------------
|
564
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "page_parts"
|
565
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
566
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:15:52.207683"], ["updated_at", "2016-10-07 11:15:52.207683"]]
|
567
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.208753"], ["updated_at", "2016-10-07 11:15:52.208753"]]
|
568
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.209839"], ["updated_at", "2016-10-07 11:15:52.209839"]]
|
569
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
570
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
571
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
572
|
+
[1m[35m (0.1ms)[0m begin transaction
|
573
|
+
-------------------------------------------
|
574
|
+
CategoryTest: test_should_update_page_parts
|
575
|
+
-------------------------------------------
|
576
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
577
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:15:52.214479"], ["updated_at", "2016-10-07 11:15:52.214479"]]
|
578
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.215868"], ["updated_at", "2016-10-07 11:15:52.215868"]]
|
579
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.217958"], ["updated_at", "2016-10-07 11:15:52.217958"]]
|
580
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
581
|
+
[1m[35mCategory Load (0.0ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
582
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
583
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
584
|
+
[1m[36mSQL (0.4ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:15:52.221500"], ["id", 1]]
|
585
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Main 2"], ["updated_at", "2016-10-07 11:15:52.223459"], ["id", 2]]
|
586
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
587
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
588
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
589
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
590
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
591
|
+
------------------------
|
592
|
+
CategoryTest: test_truth
|
593
|
+
------------------------
|
594
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
595
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
596
|
+
------------------------------------------------
|
597
|
+
PostTest: test_should_has_page_parts_definitions
|
598
|
+
------------------------------------------------
|
599
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
600
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
601
|
+
-------------------------------------------------
|
602
|
+
PostTest: test_should_load_page_parts_into_record
|
603
|
+
-------------------------------------------------
|
604
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
605
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["is_visible", "t"], ["created_at", "2016-10-07 11:15:52.243484"], ["updated_at", "2016-10-07 11:15:52.243484"]]
|
606
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.244739"], ["updated_at", "2016-10-07 11:15:52.244739"]]
|
607
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.245755"], ["updated_at", "2016-10-07 11:15:52.245755"]]
|
608
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
609
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1[0m [["id", 1]]
|
610
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Post"]]
|
611
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
612
|
+
[1m[35m (0.1ms)[0m begin transaction
|
613
|
+
-------------------------------------------------------------
|
614
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
615
|
+
-------------------------------------------------------------
|
616
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
617
|
+
[1m[35m (0.1ms)[0m begin transaction
|
618
|
+
-----------------------------------------------------
|
619
|
+
PostTest: test_should_save_page_parts_with_new_record
|
620
|
+
-----------------------------------------------------
|
621
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
622
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
623
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["is_visible", "t"], ["created_at", "2016-10-07 11:15:52.255464"], ["updated_at", "2016-10-07 11:15:52.255464"]]
|
624
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.256811"], ["updated_at", "2016-10-07 11:15:52.256811"]]
|
625
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.257867"], ["updated_at", "2016-10-07 11:15:52.257867"]]
|
626
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.258962"], ["updated_at", "2016-10-07 11:15:52.258962"]]
|
627
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
628
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
629
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
630
|
+
[1m[35m (0.1ms)[0m begin transaction
|
631
|
+
-----------------------------------------------------------------
|
632
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
633
|
+
-----------------------------------------------------------------
|
634
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
635
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.262328"], ["updated_at", "2016-10-07 11:15:52.262328"]]
|
636
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
637
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
638
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
639
|
+
-----------------------------------------------------
|
640
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
641
|
+
-----------------------------------------------------
|
642
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
643
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
644
|
+
--------------------------------------------------------
|
645
|
+
PagePartTest: test_should_not_be_valid_with_not_uniq_key
|
646
|
+
--------------------------------------------------------
|
647
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
648
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "test"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:15:52.274568"], ["updated_at", "2016-10-07 11:15:52.274568"]]
|
649
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
650
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
651
|
+
[1m[35m (0.1ms)[0m begin transaction
|
652
|
+
------------------------
|
653
|
+
PagePartTest: test_truth
|
654
|
+
------------------------
|
655
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
656
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
657
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
658
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
659
|
+
[1m[35m (0.1ms)[0m begin transaction
|
660
|
+
------------------------------------------------
|
661
|
+
PostTest: test_should_has_page_parts_definitions
|
662
|
+
------------------------------------------------
|
663
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
664
|
+
[1m[35m (0.1ms)[0m begin transaction
|
665
|
+
-------------------------------------------------
|
666
|
+
PostTest: test_should_load_page_parts_into_record
|
667
|
+
-------------------------------------------------
|
668
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
669
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:16:46.287524"], ["updated_at", "2016-10-07 11:16:46.287524"]]
|
670
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.292256"], ["updated_at", "2016-10-07 11:16:46.292256"]]
|
671
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.293626"], ["updated_at", "2016-10-07 11:16:46.293626"]]
|
672
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
673
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
674
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
675
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
676
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
677
|
+
-------------------------------------------------------------
|
678
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
679
|
+
-------------------------------------------------------------
|
680
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
681
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
682
|
+
-----------------------------------------------------
|
683
|
+
PostTest: test_should_save_page_parts_with_new_record
|
684
|
+
-----------------------------------------------------
|
685
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
686
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
687
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:16:46.309816"], ["updated_at", "2016-10-07 11:16:46.309816"]]
|
688
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.310922"], ["updated_at", "2016-10-07 11:16:46.310922"]]
|
689
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.312323"], ["updated_at", "2016-10-07 11:16:46.312323"]]
|
690
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.314114"], ["updated_at", "2016-10-07 11:16:46.314114"]]
|
691
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
692
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
693
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
694
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
695
|
+
--------------------------------------------------
|
696
|
+
PagePartsTest: test_shound_be_included_by_Category
|
697
|
+
--------------------------------------------------
|
698
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
699
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
700
|
+
-------------------------
|
701
|
+
PagePartsTest: test_truth
|
702
|
+
-------------------------
|
703
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
704
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
705
|
+
----------------------------------------------------
|
706
|
+
CategoryTest: test_should_has_page_parts_definitions
|
707
|
+
----------------------------------------------------
|
708
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
709
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
710
|
+
-----------------------------------------------------
|
711
|
+
CategoryTest: test_should_load_page_parts_into_record
|
712
|
+
-----------------------------------------------------
|
713
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
714
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:16:46.329467"], ["updated_at", "2016-10-07 11:16:46.329467"]]
|
715
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.330725"], ["updated_at", "2016-10-07 11:16:46.330725"]]
|
716
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.331789"], ["updated_at", "2016-10-07 11:16:46.331789"]]
|
717
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
718
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
719
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
720
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
721
|
+
[1m[35m (0.1ms)[0m begin transaction
|
722
|
+
-----------------------------------------------------------------
|
723
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
724
|
+
-----------------------------------------------------------------
|
725
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
726
|
+
[1m[35m (0.1ms)[0m begin transaction
|
727
|
+
---------------------------------------------------------
|
728
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
729
|
+
---------------------------------------------------------
|
730
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
731
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
732
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:16:46.339461"], ["updated_at", "2016-10-07 11:16:46.339461"]]
|
733
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.340552"], ["updated_at", "2016-10-07 11:16:46.340552"]]
|
734
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.341854"], ["updated_at", "2016-10-07 11:16:46.341854"]]
|
735
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
736
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
737
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
738
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
739
|
+
-------------------------------------------
|
740
|
+
CategoryTest: test_should_update_page_parts
|
741
|
+
-------------------------------------------
|
742
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
743
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 11:16:46.346809"], ["updated_at", "2016-10-07 11:16:46.346809"]]
|
744
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.348481"], ["updated_at", "2016-10-07 11:16:46.348481"]]
|
745
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.350560"], ["updated_at", "2016-10-07 11:16:46.350560"]]
|
746
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
747
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
748
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
749
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
750
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:16:46.354664"], ["id", 1]]
|
751
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 11:16:46.357390"], ["id", 2]]
|
752
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
753
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
754
|
+
[1m[35mPagePart Load (0.3ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
755
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
756
|
+
[1m[35m (0.1ms)[0m begin transaction
|
757
|
+
------------------------
|
758
|
+
CategoryTest: test_truth
|
759
|
+
------------------------
|
760
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
761
|
+
[1m[35m (0.1ms)[0m begin transaction
|
762
|
+
-----------------------------------------------------------------
|
763
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
764
|
+
-----------------------------------------------------------------
|
765
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
766
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:16:46.372302"], ["updated_at", "2016-10-07 11:16:46.372302"]]
|
767
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
768
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
769
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
770
|
+
-----------------------------------------------------
|
771
|
+
PagePartTest: test_should_not_be_valid_with_blank_key
|
772
|
+
-----------------------------------------------------
|
773
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
774
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
775
|
+
-----------------------------------------------------
|
776
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
777
|
+
-----------------------------------------------------
|
778
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
779
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
780
|
+
------------------------
|
781
|
+
PagePartTest: test_truth
|
782
|
+
------------------------
|
783
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
784
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
785
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
786
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
787
|
+
[1m[35m (0.1ms)[0m begin transaction
|
788
|
+
----------------------------------------------------
|
789
|
+
CategoryTest: test_should_has_page_parts_definitions
|
790
|
+
----------------------------------------------------
|
791
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
792
|
+
[1m[35m (0.1ms)[0m begin transaction
|
793
|
+
-----------------------------------------------------
|
794
|
+
CategoryTest: test_should_load_page_parts_into_record
|
795
|
+
-----------------------------------------------------
|
796
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
797
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:41:42.810799"], ["updated_at", "2016-10-07 11:41:42.810799"]]
|
798
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.815549"], ["updated_at", "2016-10-07 11:41:42.815549"]]
|
799
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.817002"], ["updated_at", "2016-10-07 11:41:42.817002"]]
|
800
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
801
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
802
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
803
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
804
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
805
|
+
-----------------------------------------------------------------
|
806
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
807
|
+
-----------------------------------------------------------------
|
808
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
809
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
810
|
+
---------------------------------------------------------
|
811
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
812
|
+
---------------------------------------------------------
|
813
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "page_parts"
|
814
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
815
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:41:42.839735"], ["updated_at", "2016-10-07 11:41:42.839735"]]
|
816
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.840851"], ["updated_at", "2016-10-07 11:41:42.840851"]]
|
817
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.841923"], ["updated_at", "2016-10-07 11:41:42.841923"]]
|
818
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
819
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
820
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
821
|
+
[1m[35m (0.1ms)[0m begin transaction
|
822
|
+
-------------------------------------------
|
823
|
+
CategoryTest: test_should_update_page_parts
|
824
|
+
-------------------------------------------
|
825
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
826
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?) [["title", "Test category"], ["created_at", "2016-10-07 11:41:42.847612"], ["updated_at", "2016-10-07 11:41:42.847612"]]
|
827
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.849057"], ["updated_at", "2016-10-07 11:41:42.849057"]]
|
828
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.850153"], ["updated_at", "2016-10-07 11:41:42.850153"]]
|
829
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
830
|
+
[1m[35mCategory Load (0.0ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
831
|
+
[1m[36mPagePart Load (0.0ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
832
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
833
|
+
[1m[36mSQL (0.5ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Sidebar 2"], ["updated_at", "2016-10-07 11:41:42.853669"], ["id", 1]]
|
834
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Main 2"], ["updated_at", "2016-10-07 11:41:42.856083"], ["id", 2]]
|
835
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
836
|
+
[1m[35mCategory Load (0.0ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
837
|
+
[1m[36mPagePart Load (0.0ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Category"]]
|
838
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
839
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
840
|
+
------------------------
|
841
|
+
CategoryTest: test_truth
|
842
|
+
------------------------
|
843
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
844
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
845
|
+
--------------------------------------------------
|
846
|
+
PagePartsTest: test_shound_be_included_by_Category
|
847
|
+
--------------------------------------------------
|
848
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
849
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
850
|
+
-------------------------
|
851
|
+
PagePartsTest: test_truth
|
852
|
+
-------------------------
|
853
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
854
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
855
|
+
-----------------------------------------------------------------
|
856
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
857
|
+
-----------------------------------------------------------------
|
858
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
859
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.863412"], ["updated_at", "2016-10-07 11:41:42.863412"]]
|
860
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
861
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
862
|
+
[1m[35m (0.3ms)[0m begin transaction
|
863
|
+
-----------------------------------------------------
|
864
|
+
PagePartTest: test_should_not_be_valid_with_blank_key
|
865
|
+
-----------------------------------------------------
|
866
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
867
|
+
[1m[35m (0.1ms)[0m begin transaction
|
868
|
+
-----------------------------------------------------
|
869
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
870
|
+
-----------------------------------------------------
|
871
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
872
|
+
[1m[35m (0.1ms)[0m begin transaction
|
873
|
+
------------------------
|
874
|
+
PagePartTest: test_truth
|
875
|
+
------------------------
|
876
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
877
|
+
[1m[35m (0.0ms)[0m begin transaction
|
878
|
+
------------------------------------------------
|
879
|
+
PostTest: test_should_has_page_parts_definitions
|
880
|
+
------------------------------------------------
|
881
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
882
|
+
[1m[35m (0.1ms)[0m begin transaction
|
883
|
+
-------------------------------------------------
|
884
|
+
PostTest: test_should_load_page_parts_into_record
|
885
|
+
-------------------------------------------------
|
886
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
887
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:41:42.888062"], ["updated_at", "2016-10-07 11:41:42.888062"]]
|
888
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.889256"], ["updated_at", "2016-10-07 11:41:42.889256"]]
|
889
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.890386"], ["updated_at", "2016-10-07 11:41:42.890386"]]
|
890
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
891
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
892
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
893
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
894
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
895
|
+
-------------------------------------------------------------
|
896
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
897
|
+
-------------------------------------------------------------
|
898
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
899
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
900
|
+
-----------------------------------------------------
|
901
|
+
PostTest: test_should_save_page_parts_with_new_record
|
902
|
+
-----------------------------------------------------
|
903
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "page_parts"
|
904
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
905
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 11:41:42.901761"], ["updated_at", "2016-10-07 11:41:42.901761"]]
|
906
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.903139"], ["updated_at", "2016-10-07 11:41:42.903139"]]
|
907
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.904243"], ["updated_at", "2016-10-07 11:41:42.904243"]]
|
908
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 11:41:42.905139"], ["updated_at", "2016-10-07 11:41:42.905139"]]
|
909
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
910
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
911
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
912
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
913
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
914
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
915
|
+
[1m[35m (0.1ms)[0m begin transaction
|
916
|
+
-----------------------------------------------------------------
|
917
|
+
PagePartTest: test_should_create_new_record_with_valid_attributes
|
918
|
+
-----------------------------------------------------------------
|
919
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
920
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["key", "somekey"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.022708"], ["updated_at", "2016-10-07 12:44:01.022708"]]
|
921
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
922
|
+
[1m[35m (2.0ms)[0m rollback transaction
|
923
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
924
|
+
-----------------------------------------------------
|
925
|
+
PagePartTest: test_should_not_be_valid_with_blank_key
|
926
|
+
-----------------------------------------------------
|
927
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
928
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
929
|
+
-----------------------------------------------------
|
930
|
+
PagePartTest: test_should_not_be_valid_with_empty_key
|
931
|
+
-----------------------------------------------------
|
932
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
933
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
934
|
+
------------------------
|
935
|
+
PagePartTest: test_truth
|
936
|
+
------------------------
|
937
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
938
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
939
|
+
----------------------------------------------------
|
940
|
+
CategoryTest: test_should_has_page_parts_definitions
|
941
|
+
----------------------------------------------------
|
942
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
943
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
944
|
+
-----------------------------------------------------
|
945
|
+
CategoryTest: test_should_load_page_parts_into_record
|
946
|
+
-----------------------------------------------------
|
947
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
948
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 12:44:01.076354"], ["updated_at", "2016-10-07 12:44:01.076354"]]
|
949
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.077714"], ["updated_at", "2016-10-07 12:44:01.077714"]]
|
950
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.079179"], ["updated_at", "2016-10-07 12:44:01.079179"]]
|
951
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
952
|
+
[1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
953
|
+
[1m[35mPagePart Load (0.2ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
954
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
955
|
+
[1m[35m (0.1ms)[0m begin transaction
|
956
|
+
-----------------------------------------------------------------
|
957
|
+
CategoryTest: test_should_raise_error_on_not_registered_page_part
|
958
|
+
-----------------------------------------------------------------
|
959
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
960
|
+
[1m[35m (0.1ms)[0m begin transaction
|
961
|
+
---------------------------------------------------------
|
962
|
+
CategoryTest: test_should_save_page_parts_with_new_record
|
963
|
+
---------------------------------------------------------
|
964
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
965
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
966
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 12:44:01.094298"], ["updated_at", "2016-10-07 12:44:01.094298"]]
|
967
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar content"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.095373"], ["updated_at", "2016-10-07 12:44:01.095373"]]
|
968
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.096400"], ["updated_at", "2016-10-07 12:44:01.096400"]]
|
969
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
970
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
971
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
972
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
973
|
+
-------------------------------------------
|
974
|
+
CategoryTest: test_should_update_page_parts
|
975
|
+
-------------------------------------------
|
976
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
977
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("title", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["title", "Test category"], ["created_at", "2016-10-07 12:44:01.103068"], ["updated_at", "2016-10-07 12:44:01.103068"]]
|
978
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "sidebar"], ["partable_type", "Category"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.104481"], ["updated_at", "2016-10-07 12:44:01.104481"]]
|
979
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "content"], ["partable_type", "Category"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.105528"], ["updated_at", "2016-10-07 12:44:01.105528"]]
|
980
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
981
|
+
[1m[36mCategory Load (0.0ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
982
|
+
[1m[35mPagePart Load (0.0ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
983
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
984
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ? [["content", "Sidebar 2"], ["updated_at", "2016-10-07 12:44:01.108992"], ["id", 1]]
|
985
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "page_parts" SET "content" = ?, "updated_at" = ? WHERE "page_parts"."id" = ?[0m [["content", "Main 2"], ["updated_at", "2016-10-07 12:44:01.111114"], ["id", 2]]
|
986
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
987
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
988
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ? [["partable_id", 1], ["partable_type", "Category"]]
|
989
|
+
[1m[36m (8.0ms)[0m [1mrollback transaction[0m
|
990
|
+
[1m[35m (0.1ms)[0m begin transaction
|
991
|
+
------------------------
|
992
|
+
CategoryTest: test_truth
|
993
|
+
------------------------
|
994
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
995
|
+
[1m[35m (0.1ms)[0m begin transaction
|
996
|
+
--------------------------------------------------
|
997
|
+
PagePartsTest: test_shound_be_included_by_Category
|
998
|
+
--------------------------------------------------
|
999
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1000
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1001
|
+
-------------------------
|
1002
|
+
PagePartsTest: test_truth
|
1003
|
+
-------------------------
|
1004
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
1005
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1006
|
+
------------------------------------------------
|
1007
|
+
PostTest: test_should_has_page_parts_definitions
|
1008
|
+
------------------------------------------------
|
1009
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
1010
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1011
|
+
-------------------------------------------------
|
1012
|
+
PostTest: test_should_load_page_parts_into_record
|
1013
|
+
-------------------------------------------------
|
1014
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1015
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 12:44:01.136499"], ["updated_at", "2016-10-07 12:44:01.136499"]]
|
1016
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Sidebar"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.138572"], ["updated_at", "2016-10-07 12:44:01.138572"]]
|
1017
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "content_uk"], ["partable_type", "Post"], ["content", "Main"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.139711"], ["updated_at", "2016-10-07 12:44:01.139711"]]
|
1018
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1019
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
1020
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = ? AND "page_parts"."partable_type" = ?[0m [["partable_id", 1], ["partable_type", "Post"]]
|
1021
|
+
[1m[35m (8.1ms)[0m rollback transaction
|
1022
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1023
|
+
-------------------------------------------------------------
|
1024
|
+
PostTest: test_should_raise_error_on_not_registered_page_part
|
1025
|
+
-------------------------------------------------------------
|
1026
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1027
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1028
|
+
-----------------------------------------------------
|
1029
|
+
PostTest: test_should_save_page_parts_with_new_record
|
1030
|
+
-----------------------------------------------------
|
1031
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
1032
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1033
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "posts" ("is_visible", "created_at", "updated_at") VALUES (?, ?, ?) [["is_visible", "t"], ["created_at", "2016-10-07 12:44:01.156723"], ["updated_at", "2016-10-07 12:44:01.156723"]]
|
1034
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["key", "title_ru"], ["partable_type", "Post"], ["content", "Title ru"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.158260"], ["updated_at", "2016-10-07 12:44:01.158260"]]
|
1035
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("key", "partable_type", "content", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "title_en"], ["partable_type", "Post"], ["content", "Title en"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.159347"], ["updated_at", "2016-10-07 12:44:01.159347"]]
|
1036
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "page_parts" ("key", "partable_type", "partable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["key", "content_ru"], ["partable_type", "Post"], ["partable_id", 1], ["created_at", "2016-10-07 12:44:01.160251"], ["updated_at", "2016-10-07 12:44:01.160251"]]
|
1037
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1038
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts"[0m
|
1039
|
+
[1m[35m (0.4ms)[0m rollback transaction
|