Navigation Menu

Skip to content

Commit

Permalink
Update test for synonyms
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 2, 2012
1 parent b6f3a61 commit c560326
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/api-configuration.test.js
Expand Up @@ -563,6 +563,7 @@ suite('Configuration API', function() {
});

test('Get, Action=UpdateSynonymOptions', function(done) {
var domain;
var synonymsObject = {
synonyms: {
tokio: ["tokyo"],
Expand All @@ -572,12 +573,18 @@ suite('Configuration API', function() {
var json = JSON.stringify(synonymsObject);
var synonyms = encodeURIComponent(json);
utils
.get('/?DomainName=companies&Action=CreateDomain&Version=2011-02-01', {
'Host': 'cloudsearch.localhost'
})
.next(function() {
domain = new Domain('companies', context);
assert.isFalse(domain.isSynonymTableAvailableSync());
})
.get('/?Version=2011-02-01&Action=UpdateSynonymOptions&' +
'DomainName=companies&Synonyms='+synonyms, {
'Host': 'cloudsearch.localhost'
})
.next(function(response) {
var domain = new Domain('companies', context);
assert.isTrue(domain.isSynonymTableAvailableSync());

response = toParsedResponse(response);
Expand Down

0 comments on commit c560326

Please sign in to comment.