Skip to content

Commit

Permalink
Kill mutants
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszreszke committed Mar 20, 2024
1 parent b41cc6b commit c7556ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def streams_of(event_id)
def search_streams(stream_name)
streams
.select { |name,| name.downcase.include?(stream_name.downcase) }
.to_a
.take(10)
.reverse
.map { |name,| Stream.new(name) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,15 @@ def read_events_backward(repository, stream = nil, from: nil, to: nil, count: ni
expect(repository.search_streams("Stream C")).to eq [stream_c]
end

specify do
11.times do |index|
stream = Stream.new("Stream #{index}")
repository.append_to_stream([ SRecord.new(event_id: SecureRandom.uuid)], stream, version_any)
end

expect(repository.search_streams("stream").size).to eq 10
end

specify do
e1 = SRecord.new(event_id: "8a6f053e-3ce2-4c82-a55b-4d02c66ae6ea")
e2 = SRecord.new(event_id: "8cee1139-4f96-483a-a175-2b947283c3c7")
Expand Down

0 comments on commit c7556ea

Please sign in to comment.