spec/fx/adapters/postgres/triggers_spec.rb in fx-0.7.0 vs spec/fx/adapters/postgres/triggers_spec.rb in fx-0.8.0

- old
+ new

@@ -24,21 +24,21 @@ EOS connection.execute <<-EOS.strip_heredoc CREATE TRIGGER uppercase_users_name BEFORE INSERT ON users FOR EACH ROW - EXECUTE PROCEDURE uppercase_users_name(); + EXECUTE FUNCTION uppercase_users_name(); EOS triggers = Postgres::Triggers.new(connection).all first = triggers.first expect(triggers.size).to eq 1 expect(first.name).to eq "uppercase_users_name" expect(first.definition).to include("BEFORE INSERT") - expect(first.definition).to match(/ON [public\.users|users]/) + expect(first.definition).to match(/ON [public.ser|]/) expect(first.definition).to include("FOR EACH ROW") - expect(first.definition).to include("EXECUTE PROCEDURE uppercase_users_name()") + expect(first.definition).to include("EXECUTE FUNCTION uppercase_users_name()") end end end end end