Commit 25c14848 authored by Piotr Skorupa's avatar Piotr Skorupa

Fix RawUsageData model specs

parent a77239f2
......@@ -13,14 +13,20 @@ RSpec.describe RawUsageData do
it { is_expected.to validate_uniqueness_of(:recorded_at) }
end
describe '#update_sent_at!' do
describe '#update_version_metadata!' do
let(:raw_usage_data) { create(:raw_usage_data) }
it 'updates sent_at' do
raw_usage_data.update_sent_at!
raw_usage_data.update_version_metadata!(usage_data_id: 123)
expect(raw_usage_data.sent_at).not_to be_nil
end
it 'updates version_usage_data_id_value' do
raw_usage_data.update_version_metadata!(usage_data_id: 123)
expect(raw_usage_data.version_usage_data_id_value).not_to be_nil
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment