Hexadecimal color changed to capital letters
The default colors in event_types and difficulty levels are in capital letters and the ones that comes from the color picker were not. Now colors are capitalized before saving the track, level or type. A rake task has also been created to capitalize color from old tracks, levels or types.
This commit is contained in:
parent
0deaf1abc7
commit
8d9bb56f06
11 changed files with 72 additions and 15 deletions
|
|
@ -236,7 +236,7 @@ describe Event do
|
|||
json_hash = event.as_json(nil)
|
||||
|
||||
expect(json_hash[:room_guid]).to eq(event.room.guid)
|
||||
expect(json_hash[:track_color]).to eq('#efefef')
|
||||
expect(json_hash[:track_color]).to eq('#EFEFEF')
|
||||
expect(json_hash[:length]).to eq(30)
|
||||
end
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ describe Event do
|
|||
json_hash = event.as_json(nil)
|
||||
|
||||
expect(json_hash[:room_guid]).to be_nil
|
||||
expect(json_hash[:track_color]).to eq('#ffffff')
|
||||
expect(json_hash[:track_color]).to eq('#FFFFFF')
|
||||
expect(json_hash[:length]).to eq(25)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue