-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
failing spec for node create with weird value
- Loading branch information
1 parent
d8727fd
commit eb262d6
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,15 @@ def self.count | |
expect(from_node_factory.query.pluck(:from_node).first).to be_a(FactoryFromClass) | ||
end.to change { FactoryFromClass.count } | ||
end | ||
|
||
context 'with a value that might be interpreted as a prop' do | ||
let(:from_node) { FactoryFromClass.new(name: '{Tricky .Value}')} | ||
it 'creates without error' do | ||
expect do | ||
expect(from_node_factory.query.pluck(:from_node).first).to be_a(FactoryFromClass) | ||
end.to change { FactoryFromClass.where(name: from_node.name).count } | ||
end | ||
end | ||
end | ||
|
||
context 'persisted' do | ||
|
@@ -54,6 +63,16 @@ def self.count | |
expect(rel_factory.query.pluck(:rel).first).to be_a(FactoryRelClass) | ||
end.to change { FactoryRelClass.count } | ||
end | ||
|
||
context 'with a value that might be interpreted as a prop' do | ||
let(:rel) { FactoryRelClass.new(score: '{9000 ....}') } | ||
|
||
it 'creates without error' do | ||
expect do | ||
expect(rel_factory.query.pluck(:rel).first).to be_a(FactoryRelClass) | ||
end.to change { FactoryRelClass.count } | ||
end | ||
end | ||
This comment has been minimized.
Sorry, something went wrong.
subvertallchris
Author
Contributor
|
||
end | ||
|
||
context 'persisted' do | ||
|
This comment has been minimized.
Sorry, something went wrong.
subvertallchrisAug 15, 2016
Author Contributor