Sha256: 2912cb7f68b9d6911b495904e538c87134264576c1085578d8a77df886469d29
Contents?: true
Size: 866 Bytes
Versions: 6
Compression:
Stored size: 866 Bytes
Contents
require 'spec_helper' describe LadyJosephine::Concerns::ServerUuid do let(:article) { Article.new title: "Local man thinks wrestling is real" } it 'updates the server uuid and version if it not set yet' do article.content_data_hash = { "uuid" => "uuid-uuid-uuid", "version" => "1.0" } article.save expect(article.lady_josephine_server_uuid).to eq "uuid-uuid-uuid" expect(article.lady_josephine_server_version).to eq "1.0" end it 'updates only the server version if the uuid is already set' do article.content_data_hash = { "uuid" => "uuid-uuid-uuid", "version" => "1.1" } article.lady_josephine_server_uuid = "abc-abc-abc" article.lady_josephine_server_version = "1.0" article.save expect(article.lady_josephine_server_uuid).to eq "abc-abc-abc" expect(article.lady_josephine_server_version).to eq "1.1" end end
Version data entries
6 entries across 6 versions & 1 rubygems