Skip to content

Commit 8763062

Browse files
authored
Merge pull request #275 from blish/add-timezone
feat(User): Add timezone
2 parents 2359b80 + a9b0a00 commit 8763062

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class AddTimezoneToSpreeUsers < ActiveRecord::Migration[7.2]
2+
def change
3+
add_column :spree_users, :timezone, :string, if_not_exists: true,
4+
comment: "User's timezone, e.g., 'Eastern Time (US & Canada)'"
5+
end
6+
end

‎spec/models/user_spec.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
expect(create(:user).admin?).to be false
99
end
1010

11+
describe "#timezone" do
12+
subject(:user) { create(:user) }
13+
it { expect(user).to respond_to(:timezone) }
14+
end
15+
1116
context "recoverable" do
1217
let(:user) { create(:user) }
1318

0 commit comments

Comments
 (0)