Skip to content

Commit

Permalink
adds failing test for #944
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmandu committed May 16, 2019
1 parent 43069de commit 929d527
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions wheels/tests/model/crud/findall.cfc
Expand Up @@ -11,7 +11,7 @@ component extends="wheels.tests.Test" {

function test_convert_blank_string_to_null() {
q = model("author").findAll(where="firstName != ''");
assert("q.recordCount IS 7");
assert("q.recordCount IS 8");
}

function test_paginated_finder_calls_with_no_records_include_column_names() {
Expand Down Expand Up @@ -65,6 +65,20 @@ component extends="wheels.tests.Test" {
assert("authors.recordCount eq 2");
}

/*
Failing test for: https://github.com/cfwheels/cfwheels/issues/944
function test_in_operator_with_spaces_and_equals_comma_value_combo_with_brackets() {
authors = model("author").findAll(
where=ArrayToList([
"id IN (8)",
"(lastName = 'Chapman, Duke of Surrey')"
], " AND ")
);
assert("authors.recordCount eq 1");
}
*/

function test_moving_aggregate_functions_in_where_to_having() {
results1 = model("user").findAll(
select="state, salesTotal",
Expand Down Expand Up @@ -93,7 +107,7 @@ component extends="wheels.tests.Test" {

function test_convert_handle_to_allowed_variable() {
actual = model("author").findAll(handle="dot.notation test");
assert("actual.recordCount eq 7");
assert("actual.recordCount eq 8");
}

}
2 changes: 1 addition & 1 deletion wheels/tests/model/crud/updates.cfc
Expand Up @@ -77,7 +77,7 @@ component extends="wheels.tests.Test" {
allKermits = model("Author").findAll(where="firstName='Kermit' AND lastName='Frog'");
transaction action="rollback";
}
assert('allKermits.recordcount eq 7');
assert('allKermits.recordcount eq 8');
}

function test_update_all_for_soft_deleted_records() {
Expand Down
1 change: 1 addition & 0 deletions wheels/tests/populate.cfm
Expand Up @@ -384,6 +384,7 @@ FROM users u INNER JOIN galleries g ON u.id = g.userid
<cfset local.james = model("author").create(firstName="James", lastName="Gibson")>
<cfset local.raul = model("author").create(firstName="Raul", lastName="Riera")>
<cfset local.andy = model("author").create(firstName="Andy", lastName="Bellenie")>
<cfset local.adam = model("author").create(firstName="Adam", lastName="Chapman, Duke of Surrey")>

<cfset local.users = model("user").findAll(order="id")>

Expand Down

0 comments on commit 929d527

Please sign in to comment.