Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make test to pass

  • Loading branch information...
commit 4d9987cc1b2561dc63f5cf8ee3a0f1c1fe0092ff 1 parent d59f98f
@fitzchak fitzchak authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 Raven.Tests/Bugs/TenantsName.cs
View
11 Raven.Tests/Bugs/TenantsName.cs
@@ -1,3 +1,4 @@
+using System;
using Raven.Client.Document;
using Raven.Client.Extensions;
using Raven.Database.Config;
@@ -15,16 +16,18 @@ protected override void ModifyConfiguration(RavenConfiguration ravenConfiguratio
}
[Fact]
- public void CanContainSpaces()
+ public void CannotContainSpaces()
{
using (GetNewServer())
using (var documentStore = new DocumentStore { Url = "http://localhost:8079" }.Initialize())
{
const string tenantName = " Tenant with some spaces in it ";
- documentStore.DatabaseCommands.EnsureDatabaseExists(tenantName);
-
+ // TODO: we better throw here.
+ documentStore.DatabaseCommands.EnsureDatabaseExists(tenantName);
+
var databaseCommands = documentStore.DatabaseCommands.ForDatabase(tenantName);
- databaseCommands.Put("posts/", null, new RavenJObject(), new RavenJObject());
+ // TODO: we better throw here with a better error message than "tenant not found".
+ Assert.Throws<InvalidOperationException>(() => databaseCommands.Put("posts/", null, new RavenJObject(), new RavenJObject()));
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.