Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mkanoor committed Mar 1, 2017
1 parent 6f276be commit 666ad98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions db/migrate/20170222214902_add_initiator_to_service.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class AddInitiatorToService < ActiveRecord::Migration[5.0]
class Service < ActiveRecord::Base; end

def up
add_column :services, :initiator, :string, :comment => "Entity that initiated the service creation"
say_with_time("Updating existing services to 'user' initiator") do
Expand Down
12 changes: 0 additions & 12 deletions spec/migrations/20170222214902_add_initiator_to_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,4 @@
expect(service_stub.find_by(:name => 'service2').initiator).to eq(default_initiator)
end
end

migration_context :down do
it "removes initiator" do
service_stub.create!(:name => 'service1', :initiator => default_initiator)
service_stub.create!(:name => 'service2', :initiator => default_initiator)

migrate

expect(service_stub.count).to eq(2)
expect(service_stub.columns.collect(&:name).exclude?('initiator')).to be_truthy
end
end
end

0 comments on commit 666ad98

Please sign in to comment.