Skip to content

Commit 23ef718

Browse files
committed
added a test trying to reproduce #1440 to no avail
1 parent 0cbf70b commit 23ef718

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Reflection;
5+
using FluentAssertions;
6+
using Nest.Tests.MockData.Domain;
7+
using NUnit.Framework;
8+
9+
namespace Nest.Tests.Unit.Reproduce
10+
{
11+
/// <summary>
12+
/// tests to reproduce reported errors
13+
/// </summary>
14+
[TestFixture]
15+
public class Reproduce1440Tests : BaseJsonTests
16+
{
17+
[Test]
18+
public void CountShouldNotThrowWhenNoDefaultIndexSpecified()
19+
{
20+
var client = new ElasticClient();
21+
var request = client.Count<ElasticsearchProject>();
22+
var path = new Uri(request.ConnectionStatus.RequestUrl).AbsolutePath;
23+
path.Should().Be("/_all/elasticsearchprojects/_count");
24+
request = client.Count<ElasticsearchProject>(c=>c.Index("x"));
25+
path = new Uri(request.ConnectionStatus.RequestUrl).AbsolutePath;
26+
path.Should().Be("/x/elasticsearchprojects/_count");
27+
}
28+
29+
}
30+
}

0 commit comments

Comments
 (0)