We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d3fe83 commit a68360fCopy full SHA for a68360f
1 file changed
spec/repository_spec.rb
@@ -62,4 +62,20 @@
62
expect(subject.statements.first).to eq existing_statement
63
expect(subject.statements.first).to be_inferred
64
end
65
+
66
+ it "performs coherent list updates" do
67
+ # List updates require reading from the repository mid-transaction, which requires a SerializedTransaction
68
+ repo = RDF::Repository.new
69
+ lh = RDF::Node.new("o")
70
+ repo << RDF::Statement.new(RDF::URI('s'), RDF::URI('p'), lh)
71
+ expect(repo.count).to eq 1
72
+ repo.transaction(mutable: true) do |tx|
73
+ list = RDF::List.new(subject: lh, graph: tx, values: %w(a b c))
74
+ expect(tx.count).to eq 7
75
+ list[0, 2] = %(d)
76
+ expect(tx.count).to eq 5
77
+ end
78
+ expect(repo.count).to eq 5
79
80
81
0 commit comments