spec/controllers/dsl_controller_spec.rb in databound-0.0.3 vs spec/controllers/dsl_controller_spec.rb in databound-0.1.0

- old
+ new

@@ -16,11 +16,15 @@ post(:create, javascriptize(data)) end it 'responds consistently to js' do - expect(rubize(response)).to eq(success: true, id: 1) + expect(rubize(response)).to eq( + success: true, + id: 1, + scoped_records: all_records, + ) end it 'creates the record' do user = User.find(1) user_attributes = user.attributes.to_options @@ -46,11 +50,15 @@ post(:create, javascriptize(data)) end it 'responds consistently to js' do - expect(rubize(response)).to eq(success: true, id: 1) + expect(rubize(response)).to eq( + success: true, + id: 1, + scoped_records: all_records, + ) end it 'creates the record' do user = User.find(1) user_attributes = user.attributes.to_options @@ -101,11 +109,15 @@ post(:update, javascriptize(data)) end it 'responds consistently to js' do - expect(rubize(response)).to eq(success: true, id: 1) + expect(rubize(response)).to eq( + success: true, + id: 1, + scoped_records: all_records, + ) end it 'updates the record' do user = User.find(1) user_attributes = user.attributes.to_options @@ -134,10 +146,14 @@ post(:update, javascriptize(data)) end it 'responds consistently to js' do - expect(rubize(response)).to eq(success: true, id: 1) + expect(rubize(response)).to eq( + success: true, + id: 1, + scoped_records: all_records, + ) end it 'updates the record' do user = User.find(1) user_attributes = user.attributes.to_options