mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add rubocop to our build. (#5004)
This commit is contained in:
@@ -17,8 +17,8 @@ RSpec.describe ColumnDropper do
|
||||
it "can correctly drop columns after correct delay" do
|
||||
Topic.exec_sql "ALTER TABLE topics ADD COLUMN junk int"
|
||||
name = Topic
|
||||
.exec_sql("SELECT name FROM schema_migration_details LIMIT 1")
|
||||
.getvalue(0,0)
|
||||
.exec_sql("SELECT name FROM schema_migration_details LIMIT 1")
|
||||
.getvalue(0, 0)
|
||||
|
||||
Topic.exec_sql("UPDATE schema_migration_details SET created_at = :created_at WHERE name = :name",
|
||||
name: name, created_at: 15.minutes.ago)
|
||||
@@ -30,7 +30,7 @@ RSpec.describe ColumnDropper do
|
||||
after_migration: name,
|
||||
columns: ['junk'],
|
||||
delay: 20.minutes,
|
||||
on_drop: ->(){dropped_proc_called = true}
|
||||
on_drop: ->() { dropped_proc_called = true }
|
||||
)
|
||||
|
||||
expect(has_column?('topics', 'junk')).to eq(true)
|
||||
@@ -41,7 +41,7 @@ RSpec.describe ColumnDropper do
|
||||
after_migration: name,
|
||||
columns: ['junk'],
|
||||
delay: 10.minutes,
|
||||
on_drop: ->(){dropped_proc_called = true}
|
||||
on_drop: ->() { dropped_proc_called = true }
|
||||
)
|
||||
|
||||
expect(has_column?('topics', 'junk')).to eq(false)
|
||||
|
||||
Reference in New Issue
Block a user