Skip to content

Commit

Permalink
tests: Fixed syntax of some expectations (#1470)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Aug 28, 2024
1 parent 4770a8a commit 746986b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
database_id: @fkdc_database_id
end

expect(captured_output).to include
"Altered ShoppingCarts table with FKShoppingCartsCustomerName " +
"foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
expect(captured_output).to include "Altered ShoppingCarts table with FKShoppingCartsCustomerName"
expect(captured_output).to include "foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
database_id: @fkdc_database_id
end

expect(captured_output).to include
"Created Customers and ShoppingCarts table with FKShoppingCartsCustomerId "+
"foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
expect(captured_output).to include "Created Customers and ShoppingCarts table with FKShoppingCartsCustomerId"
expect(captured_output).to include "foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
database_id: @fkdc_database_id
end

expect(captured_output).to include
"Altered ShoppingCarts table to drop FKShoppingCartsCustomerName " +
"foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
expect(captured_output).to include "Altered ShoppingCarts table to drop FKShoppingCartsCustomerName"
expect(captured_output).to include "foreign key constraint on database #{@fkdc_database_id} on instance #{@instance_id}"
end
end
28 changes: 14 additions & 14 deletions spanner/spec/spanner_sequence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
database_id: @seq_database_id
end

expect(captured_output).to include
"Created Seq sequence and Customers table, where the key column CustomerId uses the sequence as a default value"
expect(captured_output).to include \
"Created Seq sequence and Customers table, where the key column CustomerId uses the sequence as a default value"
end

example "spanner_alter_sequence" do
Expand All @@ -54,15 +54,15 @@
database_id: @seq_database_id
end

expect(captured_output).to include
"Altered Seq sequence to skip an inclusive range between 1000 and 5000000"
expect(captured_output).to include \
"Altered Seq sequence to skip an inclusive range between 1000 and 5000000"

spanner_drop_sequence project_id: @project_id,
instance_id: @instance_id,
database_id: @seq_database_id
end

example "spanner_alter_sequence" do
example "spanner_alter_sequence 2" do
spanner_create_sequence project_id: @project_id,
instance_id: @instance_id,
database_id: @seq_database_id
Expand All @@ -73,8 +73,8 @@
database_id: @seq_database_id
end

expect(captured_output).to include
"Altered Customers table to drop DEFAULT from CustomerId column and dropped the Seq sequence"
expect(captured_output).to include \
"Altered Customers table to drop DEFAULT from CustomerId column and dropped the Seq sequence"
end
end

Expand All @@ -94,8 +94,8 @@
database_id: @database_id
end

expect(captured_output).to include
"Created Seq sequence and Customers table, where the key column CustomerId uses the sequence as a default value"
expect(captured_output).to include \
"Created Seq sequence and Customers table, where its key column CustomerId uses the sequence as a default value"
end

example "spanner_postgresql_alter_sequence" do
Expand All @@ -109,15 +109,15 @@
database_id: @database_id
end

expect(captured_output).to include
"Altered Seq sequence to skip an inclusive range between 1000 and 5000000"
expect(captured_output).to include \
"Altered Seq sequence to skip an inclusive range between 1000 and 5000000"

spanner_postgresql_drop_sequence project_id: @project_id,
instance_id: @instance_id,
database_id: @database_id
end

example "spanner_postgresql_alter_sequence" do
example "spanner_postgresql_alter_sequence 2" do
spanner_postgresql_create_sequence project_id: @project_id,
instance_id: @instance_id,
database_id: @database_id
Expand All @@ -128,7 +128,7 @@
database_id: @database_id
end

expect(captured_output).to include
"Altered Customers table to drop DEFAULT from CustomerId column and dropped the Seq sequence"
expect(captured_output).to include \
"Altered Customers table to drop DEFAULT from CustomerId column and dropped the Seq sequence"
end
end

0 comments on commit 746986b

Please sign in to comment.